3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { protected static $wheels = 4; public function wheels() { return "Car has " . self::$wheels . " wheels\n"; } } $car = new Car(); print $car->wheels();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GMb7r
function name:  (null)
number of ops:  7
compiled vars:  !0 = $car
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Car'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'wheels'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class Car:
Function wheels:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GMb7r
function name:  wheels
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'wheels'
          1        CONCAT                                           ~1      'Car+has+', ~0
          2        CONCAT                                           ~2      ~1, '+wheels%0A'
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function wheels

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.21 ms | 1422 KiB | 13 Q