3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar($baz) { return strtoupper($baz); } public function test() { return "abc{$this->bar('def')}hij"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DM8g4
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DM8g4
function name:  bar
number of ops:  6
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    6     5*     > RETURN                                                   null

End of function bar

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DM8g4
function name:  test
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ROPE_INIT                                     3  ~2      'abc'
          1        INIT_METHOD_CALL                                         'bar'
          2        SEND_VAL_EX                                              'def'
          3        DO_FCALL                                      0  $0      
          4        ROPE_ADD                                      1  ~2      ~2, $0
          5        ROPE_END                                      2  ~1      ~2, 'hij'
          6      > RETURN                                                   ~1
    9     7*     > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.18 ms | 1395 KiB | 15 Q