3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class a { public function run() { echo "a::run get_class: " . get_class($this); echo "\na::run __CLASS__: " . __CLASS__; } } class b extends a{ public function run_b() { echo "b::run_b get_class: " . get_class($this); echo "\nb::run_b __CLASS__: " . __CLASS__; } } //$a = new a(); $b = new b(); //echo "\na->run();\n"; //$a->run(); echo "\n\nb->run();\n"; $b->run(); echo "\n\nb->run_b();\n"; $b->run_b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oq5qh
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'b'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        ECHO                                                     '%0A%0Ab-%3Erun%28%29%3B%0A'
   28     4        INIT_METHOD_CALL                                         !0, 'run'
          5        DO_FCALL                                      0          
   30     6        ECHO                                                     '%0A%0Ab-%3Erun_b%28%29%3B%0A'
   31     7        INIT_METHOD_CALL                                         !0, 'run_b'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class a:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oq5qh
function name:  run
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_THIS                                       ~0      
          1        GET_CLASS                                        ~1      ~0
          2        CONCAT                                           ~2      'a%3A%3Arun+get_class%3A+', ~1
          3        ECHO                                                     ~2
    8     4        ECHO                                                     '%0Aa%3A%3Arun+__CLASS__%3A+a'
    9     5      > RETURN                                                   null

End of function run

End of class a.

Class b:
Function run_b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oq5qh
function name:  run_b
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_THIS                                       ~0      
          1        GET_CLASS                                        ~1      ~0
          2        CONCAT                                           ~2      'b%3A%3Arun_b+get_class%3A+', ~1
          3        ECHO                                                     ~2
   17     4        ECHO                                                     '%0Ab%3A%3Arun_b+__CLASS__%3A+b'
   18     5      > RETURN                                                   null

End of function run_b

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oq5qh
function name:  run
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_THIS                                       ~0      
          1        GET_CLASS                                        ~1      ~0
          2        CONCAT                                           ~2      'a%3A%3Arun+get_class%3A+', ~1
          3        ECHO                                                     ~2
    8     4        ECHO                                                     '%0Aa%3A%3Arun+__CLASS__%3A+a'
    9     5      > RETURN                                                   null

End of function run

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.33 ms | 1395 KiB | 13 Q