3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(~E_NOTICE); $path = "/var/www/foo"; var_dump($pаth."/user/supplied/path"); // prints /user/supplied/path, and emits a notice // let's write a secure random number generator function crypto_rnd() { $rnd = mt_rand(0, 1e30); // 3v4l apparently doesn't have openssl_random_pseudo_bytes $today = date('c'); // extra entropy can't hurt! return hash("sha512", $r⁠nd.$today); // oops, that's actually r\u2060nd, which is undefined, // i.e. NULL, and the result depends only on the current time... } var_dump(crypto_rnd() === crypto_rnd()); // bool(true)... uh oh $foo = 1; var_dump($foo === $foо); // bool(false)... $x = 2; var_dump($x+$⁠x); // int(2)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0uqCf
function name:  (null)
number of ops:  27
compiled vars:  !0 = $path, !1 = $pаth, !2 = $foo, !3 = $foо, !4 = $x, !5 = $⁠x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -9
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, '%2Fvar%2Fwww%2Ffoo'
    6     4        INIT_FCALL                                               'var_dump'
          5        CONCAT                                           ~8      !1, '%2Fuser%2Fsupplied%2Fpath'
          6        SEND_VAL                                                 ~8
          7        DO_ICALL                                                 
   15     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'crypto_rnd'
         10        DO_FCALL                                      0  $10     
         11        INIT_FCALL                                               'crypto_rnd'
         12        DO_FCALL                                      0  $11     
         13        IS_IDENTICAL                                     ~12     $10, $11
         14        SEND_VAL                                                 ~12
         15        DO_ICALL                                                 
   17    16        ASSIGN                                                   !2, 1
   18    17        INIT_FCALL                                               'var_dump'
         18        IS_IDENTICAL                                     ~15     !2, !3
         19        SEND_VAL                                                 ~15
         20        DO_ICALL                                                 
   20    21        ASSIGN                                                   !4, 2
   21    22        INIT_FCALL                                               'var_dump'
         23        ADD                                              ~18     !4, !5
         24        SEND_VAL                                                 ~18
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Function crypto_rnd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0uqCf
function name:  crypto_rnd
number of ops:  16
compiled vars:  !0 = $rnd, !1 = $today, !2 = $r⁠nd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'mt_rand'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1.0e+30
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
   11     5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'c'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   12     9        INIT_FCALL                                               'hash'
         10        SEND_VAL                                                 'sha512'
         11        CONCAT                                           ~7      !2, !1
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
         14      > RETURN                                                   $8
   14    15*     > RETURN                                                   null

End of function crypto_rnd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.76 ms | 1403 KiB | 25 Q