3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function getData() { return array('a' => array('b' => 'hello world')); } function myfunction() { return '(($__data = $this->getData(), $__data["a"]["b"]) ? true : false)'; } } $foo = new foo(); var_dump(eval($foo->myfunction()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aeF9p
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'myfunction'
          5        DO_FCALL                                      0  $4      
          6        INCLUDE_OR_EVAL                                  $5      $4, EVAL
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class foo:
Function getdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aeF9p
function name:  getData
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   <array>
    7     1*     > RETURN                                                   null

End of function getdata

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aeF9p
function name:  myfunction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   '%28%28%24__data+%3D+%24this-%3EgetData%28%29%2C+%24__data%5B%22a%22%5D%5B%22b%22%5D%29+%3F+true+%3A+false%29'
   12     1*     > RETURN                                                   null

End of function myfunction

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.42 ms | 940 KiB | 16 Q