3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($var){ echo "in function: ",__FUNCTION__; echo "testing $var\n"; } class bla { public $foo = ["test"]; public function bar($str="default") { echo ($this->foo)($str),"\n"; // php5 fails w/o method below specified } } (new bla)->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uieji
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'bla'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uieji
function name:  test
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'in+function%3A+'
          2        ECHO                                                     'test'
    5     3        ROPE_INIT                                     3  ~2      'testing+'
          4        ROPE_ADD                                      1  ~2      ~2, !0
          5        ROPE_END                                      2  ~1      ~2, '%0A'
          6        ECHO                                                     ~1
    6     7      > RETURN                                                   null

End of function test

Class bla:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uieji
function name:  bar
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV_INIT                                        !0      'default'
   13     1        FETCH_OBJ_R                                      ~1      'foo'
          2        INIT_DYNAMIC_CALL                                        ~1
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6        ECHO                                                     '%0A'
   14     7      > RETURN                                                   null

End of function bar

End of class bla.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.35 ms | 1385 KiB | 13 Q