3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} class B extends A {} class Test { public function run(A $object){ return true; } } $test = new Test; $a = new A; $b = new B; var_dump($test->run($a)); var_dump($test->run($b));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gqvFl
function name:  (null)
number of ops:  22
compiled vars:  !0 = $test, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   16     3        NEW                                              $6      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   17     6        NEW                                              $9      'B'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
   19     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'run'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0  $12     
         13        SEND_VAR                                                 $12
         14        DO_ICALL                                                 
   20    15        INIT_FCALL                                               'var_dump'
         16        INIT_METHOD_CALL                                         !0, 'run'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0  $14     
         19        SEND_VAR                                                 $14
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]
Class Test:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gqvFl
function name:  run
number of ops:  3
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1      > RETURN                                                   <true>
   11     2*     > RETURN                                                   null

End of function run

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.24 ms | 1395 KiB | 15 Q