3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', true); error_reporting(-1); class Dog{ public static function sound(){ $bark = "WOOF!"; return $bark; } } $new = new Dog(); echo Dog::sound(); echo $new->sound();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h88CZ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 -1
          6        DO_ICALL                                                 
   13     7        NEW                                              $3      'Dog'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $3
   14    10        INIT_STATIC_METHOD_CALL                                  'Dog', 'sound'
         11        DO_FCALL                                      0  $6      
         12        ECHO                                                     $6
   15    13        INIT_METHOD_CALL                                         !0, 'sound'
         14        DO_FCALL                                      0  $7      
         15        ECHO                                                     $7
         16      > RETURN                                                   1

Class Dog:
Function sound:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h88CZ
function name:  sound
number of ops:  3
compiled vars:  !0 = $bark
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'WOOF%21'
    9     1      > RETURN                                                   !0
   10     2*     > RETURN                                                   null

End of function sound

End of class Dog.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.66 ms | 1397 KiB | 17 Q