3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class Dog{ public static function sound(){ $bark = "WOOF!"; return $bark; } } $new = new Dog(); echo Dog::sound(); echo $new->sound(); // Just to make sure that 3v4l.org displays deprecated notices eregi('a', 'b');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZnSS8
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                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   12     3        NEW                                              $2      'Dog'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   13     6        INIT_STATIC_METHOD_CALL                                  'Dog', 'sound'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
   14     9        INIT_METHOD_CALL                                         !0, 'sound'
         10        DO_FCALL                                      0  $6      
         11        ECHO                                                     $6
   17    12        INIT_FCALL_BY_NAME                                       'eregi'
         13        SEND_VAL_EX                                              'a'
         14        SEND_VAL_EX                                              'b'
         15        DO_FCALL                                      0          
         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/ZnSS8
function name:  sound
number of ops:  3
compiled vars:  !0 = $bark
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'WOOF%21'
    8     1      > RETURN                                                   !0
    9     2*     > RETURN                                                   null

End of function sound

End of class Dog.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.8 ms | 1395 KiB | 15 Q