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
 $cryptage = array(1 => array(0 => "Ligne 1"),2 =>array(0 => "Ligne 2"), 3 => array(0 => "Ligne 3"),
 4 => array(0 => "Ligne 4"),5 => array(0 => "Ligne 5"));
 $alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t',"u/v",'w','x','y','z'];
 shuffle($alphabet);
 /*print_r($alphabet);*/
 foreach($alphabet as $key => $value)
 {
        if($key <5)
    {$cryptage[1][] = $alphabet[$key];}
        else if ($key <10)
    {$cryptage[2][] = $alphabet[$key];}
     else if ($key <15)
    {$cryptage[3][] = $alphabet[$key];}
     else if ($key <20)
    {$cryptage[4][] = $alphabet[$key];}
    else
    {$cryptage[5][] = $alphabet[$key];}
 }
 print_r($cryptage);
 
  $message = "bouteille.";
  $message_clean= str_replace(".", "", $message);
  $message_tab = str_split($message_clean);
  
  crypt_message($message_tab,$cryptage);
  
  
  /* cryptage */
  
  function crypt_message($message,$cryptage)
  {
      
      $crypted_message = array();
      foreach($message as $key => $value)
      {
          if($message[$key] == 'u' || $message[$key] == 'v')
              {
                  $dizaine = searchForId("u/v",$cryptage);
                    $unite = array_search("u/v",$cryptage[$dizaine]);
                     $dizaine = $dizaine * 10;
                  $crypted_message[]= $dizaine + $unite;
              }
            else{      
          $dizaine = searchForId($message[$key],$cryptage);
          $unite = array_search($message[$key],$cryptage[$dizaine]);
          $dizaine = $dizaine * 10;
          $crypted_message[] = $dizaine + $unite;
            }
      }
      
      echo "Message code : ";
      print_r($crypted_message);
      decrypt_message($crypted_message,$cryptage);
  }
  
  /* decryptage */
  
  function decrypt_message($crypted, $cryptage)
  {
      $decrypted_message = array();
      
      foreach($crypted as $key => $value)
      {
          $unite = $crypted[$key] % 10;
          $dizaine = ($crypted[$key] - $unite) / 10;
          $decrypted_message[] = $cryptage[$dizaine][$unite];
      }
      
      
      echo "Message decode :";
      print_r($decrypted_message);
  }
  
  
  
  /* recherche multidimensionnelle */
  
  function searchForId($id, $array) {
   foreach ($array as $key => $val) {
           if ($val[1] === $id || $val[2] === $id || $val[3] === $id || $val[4] === $id || $val[5] === $id) {
               return $key;
           }
   }
   return null;
}


 
 ?>
</body>
</html>

prova

php

<?php
abstract class ClassA
{
  public static function Foo($sum)
  {
    static $var = 1;
    
    echo $var + $sum;
  }
}

class ClassB extends ClassA
{
    public static function Foo($sum)
    {
        static $var = 2;
        echo $var + $sum;
    }
    
    public function Self()
    {
        self::Foo(4);
    }
    
    public function Parent()
    {
        parent::Foo(5);
    }
    
    public function Static()
    {
        static::Foo(6);
    }
    
    public function className()
    {
        classA::Foo(7);
    }
}

$test = new ClassB;
$test->Self();
echo "\n";
$test->Parent();
echo "\n";
$test->Static();
echo "\n";
$test->className();

hkhk

php

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

Bruno4

php

<html>
<head>
<title>Bruno, if i ostale putešesvije</title>
</head>
<body>
<?php
   $traffic = NULL;
   echo "Bruno, kad ces doma?";
   if ($traffic =NULL){
       echo "Soon!";
   }
   if ($traffic ==NULL){
       echo "NEVER!";
   }
?>
</body>
</html>

SimpleI

php

<?php
$P=120;
$R=5;
$T=6;
$SI=($P*$R*$T)/100;
   echo "Amount to pay=$SI";
?>

Leap year

php

<?php
$year=2008;
if($year % 4 ==0){
echo"To the people born on 29 February- Ya your birthday is near";
}
else{
    echo"To the people born on 29 February - Sorry this is not a leap year";
}
?>

Execute PHP Online

php

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

comment

php

<?php if ( ! is_front_page() ): ?>
		<div class="entry-header inner-page-banner-bg" style="background-image: url('<?php // echo inner_page_banner_bg();?>');">
			<div>
				<div class="top-title">
					<h1 class="heading-1" itemprop="headline"><?php the_title(); ?>
						<?php if( get_field('ad_banner_btn_name') ): ?><a href="<?php echo $ad_banner_btn_link['url']; ?>" class="btn btn-2"><?php the_field('ad_banner_btn_name'); ?></a><?php endif; ?>
					</h1>

				</div>
			</div>
		</div>
	
	<?php endif; ?>

aaaa

php

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

hgghghg

php

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

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

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