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/YqsdP
function name:  (null)
number of ops:  16
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++2+%3D%3E+%27authenticated+user%27%2C%0A++3+%3D%3E+%27administrator%27%2C%0A++6+%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        INCLUDE_OR_EVAL                                          '%24foo+%3D+%24string%3B', EVAL
   13     7        CONCAT                                           ~8      '%24bar+%3D+', !1
          8        INCLUDE_OR_EVAL                                          ~8, EVAL
   14     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   15    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.85 ms | 1394 KiB | 17 Q