3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $pub = 'public in a'; function pub() { echo "Entering a::pub\n"; var_dump($this->pub); echo "Leaving a::pub\n"; } } class x { public $pub = 'public in x'; function pub() { echo "Entering x::pub\n"; a::pub(); echo "Leaving x::pub\n"; } } function main() { $a = new a; $x = new x; echo "Calling a->pub\n"; $a->pub(); echo "Calling x->pub\n"; $x->pub(); } echo "Calling main()\n"; main(); echo "Done\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v9UnE
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   ECHO                                                     'Calling+main%28%29%0A'
   32     1        INIT_FCALL                                               'main'
          2        DO_FCALL                                      0          
   33     3        ECHO                                                     'Done%0A'
          4      > RETURN                                                   1

Function main:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v9UnE
function name:  main
number of ops:  13
compiled vars:  !0 = $a, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   23     3        NEW                                              $5      'x'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   25     6        ECHO                                                     'Calling+a-%3Epub%0A'
   26     7        INIT_METHOD_CALL                                         !0, 'pub'
          8        DO_FCALL                                      0          
   27     9        ECHO                                                     'Calling+x-%3Epub%0A'
   28    10        INIT_METHOD_CALL                                         !1, 'pub'
         11        DO_FCALL                                      0          
   29    12      > RETURN                                                   null

End of function main

Class a:
Function pub:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v9UnE
function name:  pub
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'Entering+a%3A%3Apub%0A'
    7     1        INIT_FCALL                                               'var_dump'
          2        FETCH_OBJ_R                                      ~0      'pub'
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                                 
    8     5        ECHO                                                     'Leaving+a%3A%3Apub%0A'
    9     6      > RETURN                                                   null

End of function pub

End of class a.

Class x:
Function pub:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v9UnE
function name:  pub
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Entering+x%3A%3Apub%0A'
   16     1        INIT_STATIC_METHOD_CALL                                  'a', 'pub'
          2        DO_FCALL                                      0          
   17     3        ECHO                                                     'Leaving+x%3A%3Apub%0A'
   18     4      > RETURN                                                   null

End of function pub

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.67 ms | 1403 KiB | 16 Q