3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = "/var/www/foo"; var_dump($pаth."/user/supplied/path"); // prints /user/supplied/path, and emits a notice // let's write a random number generator function crypto_rnd() { $rnd = openssl_random_pseudo_bytes(100); // most likely secure $today = date('c'); // extra entropy can't hurt! return hash("sha512", $r⁠n.$today); // oops, that's actually r\u2060nd, which is undefined, i.e. NULL, i.e. pwned } var_dump(crypto_rnd() === crypto_rnd()); // uh oh...
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ijc32
function name:  (null)
number of ops:  14
compiled vars:  !0 = $path, !1 = $pаth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fvar%2Fwww%2Ffoo'
    4     1        INIT_FCALL                                               'var_dump'
          2        CONCAT                                           ~3      !1, '%2Fuser%2Fsupplied%2Fpath'
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                                 
   13     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'crypto_rnd'
          7        DO_FCALL                                      0  $5      
          8        INIT_FCALL                                               'crypto_rnd'
          9        DO_FCALL                                      0  $6      
         10        IS_IDENTICAL                                     ~7      $5, $6
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function crypto_rnd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.59 ms | 1398 KiB | 21 Q