3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { public $color = ""; public $type; public function wheel (){ return "I have 4 wheels"; } public function tire (){ return 'size 17"'; } } $auto = new Car(); $auto->color = "red"; $auto->type = "sedan"; //echo $car->wheel(); echo $car->tire();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IMm2C
function name:  (null)
number of ops:  11
compiled vars:  !0 = $auto, !1 = $car
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'Car'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        ASSIGN_OBJ                                               !0, 'color'
          4        OP_DATA                                                  'red'
   18     5        ASSIGN_OBJ                                               !0, 'type'
          6        OP_DATA                                                  'sedan'
   20     7        INIT_METHOD_CALL                                         !1, 'tire'
          8        DO_FCALL                                      0  $7      
          9        ECHO                                                     $7
         10      > RETURN                                                   1

Class Car:
Function wheel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IMm2C
function name:  wheel
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   'I+have+4+wheels'
    9     1*     > RETURN                                                   null

End of function wheel

Function tire:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IMm2C
function name:  tire
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   'size+17%22'
   13     1*     > RETURN                                                   null

End of function tire

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.99 ms | 1393 KiB | 13 Q