3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test1 { public function test($arg1, $arg2 = __CLASS__) { echo "<br>$arg2<br>"; } } class test2 { public function test() { $t = new test1; $t->test("asd"); } } $t = new test2; $t->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RitFf
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'test2'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function test

End of class test1.

Class test2:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RitFf
function name:  test
number of ops:  7
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'test1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'test'
          4        SEND_VAL_EX                                              'asd'
          5        DO_FCALL                                      0          
   15     6      > RETURN                                                   null

End of function test

End of class test2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.17 ms | 1394 KiB | 13 Q