3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Beer { const NAME = 'Beer!'; public function getName() { return self::NAME; } } class Ale extends Beer { const NAME = 'Ale!'; } $beerDrink = new Beer; $aleDrink = new Ale; echo "Beer is: " . $beerDrink->getName() ."\n"; echo "Ale is: " . $aleDrink->getName() ."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l1e6G
function name:  (null)
number of ops:  17
compiled vars:  !0 = $beerDrink, !1 = $aleDrink
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'Beer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        NEW                                              $5      'Ale'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   17     6        INIT_METHOD_CALL                                         !0, 'getName'
          7        DO_FCALL                                      0  $8      
          8        CONCAT                                           ~9      'Beer+is%3A+', $8
          9        CONCAT                                           ~10     ~9, '%0A'
         10        ECHO                                                     ~10
   18    11        INIT_METHOD_CALL                                         !1, 'getName'
         12        DO_FCALL                                      0  $11     
         13        CONCAT                                           ~12     'Ale+is%3A++', $11
         14        CONCAT                                           ~13     ~12, '%0A'
         15        ECHO                                                     ~13
         16      > RETURN                                                   1

Class Beer:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l1e6G
function name:  getName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'Beer%21'
    7     1*     > RETURN                                                   null

End of function getname

End of class Beer.

Class Ale:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l1e6G
function name:  getName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'Beer%21'
    7     1*     > RETURN                                                   null

End of function getname

End of class Ale.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.94 ms | 1394 KiB | 13 Q