3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<STRING array ( [2] => 'authenticated user', [3] => 'administrator', [6] => 'employee', ) STRING; $string2 = var_export(array(2 => 'authenticated user', 3 => 'administrator', 6 => 'employee'), TRUE); eval('$foo = ' . $string . ';'); eval('$bar = ' . $string2 . ';'); var_dump($foo); var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uF4cq
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $string2, !2 = $foo, !3 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'array+%28%0A++%5B2%5D+%3D%3E+%27authenticated+user%27%2C%0A++%5B3%5D+%3D%3E+%27administrator%27%2C%0A++%5B6%5D+%3D%3E+%27employee%27%2C%0A%29'
   10     1        INIT_FCALL                                               'var_export'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   12     6        CONCAT                                           ~7      '%24foo+%3D+', !0
          7        CONCAT                                           ~8      ~7, '%3B'
          8        INCLUDE_OR_EVAL                                          ~8, EVAL
   13     9        CONCAT                                           ~10     '%24bar+%3D+', !1
         10        CONCAT                                           ~11     ~10, '%3B'
         11        INCLUDE_OR_EVAL                                          ~11, EVAL
   14    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   15    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.79 ms | 1399 KiB | 17 Q