Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute PHP Online

php

<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
   echo("<pre>");
?>
</body>
</html>

Execute PHP Online

php

<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
   echo "<h1>Hello, PHP!</h1>\n";
?>
</body>
</html>

Execute PHP Online

php

<?php
   $user1 = array('dep','ak', 'kr');
   $user2 = array('ak','pa', 'in');
   $user3 = array('kr', 'an', 'gu');
   $user4 = array('gu','amr', 'mam');
   
   $list = array($user1,$user2,$user3,$user4);
   
    var_dump($list);
   
   foreach($list as $user)
   {
       echo $user[0].'=>';
       echo $user[1].'=>';
       echo $user[2].'=>';
       
       
   }
?>

Array Unique

php

<?php

    $emails = array(
    	"[email protected]",
    	"[email protected]",
    	"[email protected]",
    	"[email protected]",
    	"[email protected]"
    );
    $email_unique = array_unique($emails);
    
    print_r($email_unique);
?>

Execute PHP Online

php

<?php
echo '*';
$base = array(
    "123QWERT" => "123QWERT",
    "ABCD123" => "ABCD123",
);

var_dump($base);

$archivo = array(
    "123QWERT" => "123QWERT",
    "AAAA112" => "AAAA112",
);
var_dump($archivo);

$diferencia_nuevos = array_diff_key($archivo, $base);
var_dump($diferencia_nuevos);
$diferencia_nuevos2 = array_diff_key($base, $archivo);
var_dump($diferencia_nuevos2);

$nuevos_base = array(
    "123QWERT" => "123QWERT",
    "AAAA112" => "AAAA112",
    "ABCD123" => "ABCD123",
);

$no_existen = array(
    "ABCD123" => "ABCD123",
);

$archivo_nuevo = array(
    "123QWERT" => "123QWERT",
    "AAAA112" => "AAAA112",
    "ABCD123" => "ABCD123",
);

$actual = array_intersect_key($archivo_nuevo, $no_existen);
var_dump($actual);


$_ = array(array("sku" => "1231212"), array("sku" => "ABC123"));
$_data = (array_combine(array_column($_, "sku"), array_column($_, "sku")));

var_dump($_data["1231212"]);

?>

Execute PHP Online

php

<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
   $key="3859E07585FA45D87535C20619AF14EC6EA25C179CF156D07DE26449EEEEA1FECA4BCA1A176EFBABBBCA6B1E21FCD95DBC557A2476728E30B2D4699AB5B62B73";
    $transId = "60115287997";
    $apiLogin = "5T9cRn9FK";
    $Amount = "5.00";
    $textToHash= "^". $apiLogin."^". $transId ."^". $Amount."^";
   HMACSHA512($key,$textToHash);
   
   
   function HMACSHA512( $key,$textToHash)
   {
       if($key==null || $key=='')
            throw new Exception("HMACSHA512: key Parameter cannot be empty.");
        if($textToHash==null || $textToHash=='')
            throw new Exception("HMACSHA512: textToHash Parameter cannot be empty.");
        if(strlen($key)%2!=0 || strlen($key)<2)
            throw new Exception("HMACSHA512: key Parameter cannot be odd or less than 2 characters.");
        echo $key;
        $byte_array=unpack('C*', 'The quick fox jumped over the lazy brown dog');
        var_dump($byte_array);
       return null;
   }
   
   function hextobin($hexstr) 
    { 
        $n = strlen($hexstr); 
        $sbin="";   
        $i=0; 
        while($i<$n) 
        {       
            $a =substr($hexstr,$i,2);           
            $c = pack("H*",$a); 
            if ($i==0){$sbin=$c;} 
            else {$sbin.=$c;} 
            $i+=2; 
        } 
        return $sbin; 
    } 
?>
</body>
</html>

Execute PHP Online

php

<?php

    
  $arr = array("huy", "pizda", "ggurda");
  foreach ($arr as $arrElem) {
      echo "$arrElem\n", 'length is' strlen($arrElem)";
      
  }

   
    

?>

uuid

php

<?php
print_r(md5(microtime() . rand() . rand()));

Execute PHP Online

php

<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php



$json = '{"000FFF1E3CD2":{"DRIVER_VER":"0.2.39","FW":"2.10.5.554707-res","IP":"127.0.0.1","ROOM":"101","T":1547551942.2782,"bridge":"000FFF1E3CD2","data":"<c4soap name=\"GetNetworkBindings\" seq=\"\" result=\"1\"><networkbindings><networkbinding><deviceid>11</deviceid><networkbindingid>6001</networkbindingid><addresstype>1</addresstype><addr>127.0.0.1</addr><uuid>c4:control4_ea1-Training-ea1-000FFF1E3CD2</uuid><ssdptype>c4:control4_ea1</ssdptype><status>online</status></networkbinding><networkbinding><deviceid>29</deviceid><networkbindingid>6001</networkbindingid><addresstype>1</addresstype><addr /><uuid>c4:triad_one-triad-one-000FFF1F8243</uuid><ssdptype>c4:triad_one</ssdptype><status>offline</status></networkbinding><networkbinding><deviceid>34</deviceid><networkbindingid>6001</networkbindingid><addresstype>1</addresstype><addr /><uuid>c4:control4_light:C4-DIN-8REL-E-dinrail-000fff16722b</uuid><ssdptype>c4:control4_light:C4-DIN-8REL-E</ssdptype><status>offline</status></networkbinding><networkbinding><deviceid>50</deviceid><networkbindingid>6001</networkbindingid><addresstype>3</addresstype><addr>000fff0000715346</addr><uuid>000fff0000715346</uuid><ssdptype>c4:control4_light:C4-KD120</ssdptype><status>offline</status></networkbinding><networkbinding><deviceid>86</deviceid><networkbindingid>6001</networkbindingid><addresstype>3</addresstype><addr>000fff000059ca3e</addr><uuid>000fff000059ca3e</uuid><ssdptype>c4:control4_sr260:C4-SR260</ssdptype><status>online</status></networkbinding></networkbindings></c4soap>","strCommand":"GetNetworkBindings"}}';


// function for multiple dimension json
 function array_recursion(array $myarray, array $searchterms)
{
        foreach ($myarray as $key => $value)
        {
                if (is_array($value)) array_recursion($value, $searchterms);
                else if (in_array($key, $searchterms)) print $key . ": " . $value . "\n";

        }
}


$decoded = json_decode($json, true);
//If json_decode failed, the JSON is invalid.
if(!is_array($decoded)){
    throw new Exception('Received content contained invalid JSON!');
}

//Process the JSON.
//print_r($decoded); 
array_recursion($decoded,  Array('bridge','data'));








/*

//handling xml - does not work in this sandbox
$xmlstring='<c4soap name="GetNetworkBindings" seq="" result="1">
	<networkbindings>
		<networkbinding>
			<deviceid>11</deviceid>
			<networkbindingid>6001</networkbindingid>
			<addresstype>1</addresstype>
			<addr>127.0.0.1</addr>
			<uuid>c4:control4_ea1-Training-ea1-000FFF1E3CD2</uuid>
			<ssdptype>c4:control4_ea1</ssdptype>
			<status>online</status>
		</networkbinding>
	</networkbindings>
</c4soap>';
$xml = simplexml_load_string($xmlstring);
$json = json_encode($xml);
$array = json_decode($json,TRUE);



print_r($array);


<?php$xmlstring='
<c4soap name="GetNetworkBindings" seq="" result="1">
	<networkbindings>
		<networkbinding>
			<deviceid>11</deviceid>
			<networkbindingid>6001</networkbindingid>
			<addresstype>1</addresstype>
			<addr>127.0.0.1</addr>
			<uuid>c4:control4_ea1-Training-ea1-000FFF1E3CD2</uuid>
			<ssdptype>c4:control4_ea1</ssdptype>
			<status>online</status>
		</networkbinding>
		<networkbinding>
			<deviceid>29</deviceid>
			<networkbindingid>6001</networkbindingid>
			<addresstype>1</addresstype>
			<addr />
			<uuid>c4:triad_one-triad-one-000FFF1F8243</uuid>
			<ssdptype>c4:triad_one</ssdptype>
			<status>offline</status>
		</networkbinding>
		<networkbinding>
			<deviceid>34</deviceid>
			<networkbindingid>6001</networkbindingid>
			<addresstype>1</addresstype>
			<addr />
			<uuid>c4:control4_light:C4-DIN-8REL-E-dinrail-000fff16722b</uuid>
			<ssdptype>c4:control4_light:C4-DIN-8REL-E</ssdptype>
			<status>offline</status>
		</networkbinding>
		<networkbinding>
			<deviceid>50</deviceid>
			<networkbindingid>6001</networkbindingid>
			<addresstype>3</addresstype>
			<addr>000fff0000715346</addr>
			<uuid>000fff0000715346</uuid>
			<ssdptype>c4:control4_light:C4-KD120</ssdptype>
			<status>offline</status>
		</networkbinding>
		<networkbinding>
			<deviceid>86</deviceid>
			<networkbindingid>6001</networkbindingid>
			<addresstype>3</addresstype>
			<addr>000fff000059ca3e</addr>
			<uuid>000fff000059ca3e</uuid>
			<ssdptype>c4:control4_sr260:C4-SR260</ssdptype>
			<status>online</status>
		</networkbinding>
	</networkbindings>
</c4soap>';
$xml = simplexml_load_string($xmlstring);
$json = json_encode($xml);
$array = json_decode($json,TRUE);

 function array_recursion(array $myarray, array $searchterms)
{
        foreach ($myarray as $key => $value)
        {
                if (is_array($value)) array_recursion($value, $searchterms);
                else if (in_array($key, $searchterms)) print $key . ": " . $value . "\n";

        }
}

array_recursion($array,  Array('deviceid'));
//print_r($array);


*/


   
   
   
   
   
?>
</body>
</html>

livekeygenerator

php

<?php

 
$orderNo = 'CSTM_4KOP4R1690H';
$apiKey='?xn6dZdr';
$status='live';
$data=$orderNo.'|'.$apiKey.'|'.$status;
$hashKey=hash('sha512', $data);
echo $hashKey;
?>

Previous 1 ... 5 6 7 8 9 10 11 ... 103 Next
Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.