3v4l.org

run code in 300+ PHP versions simultaneously
<?php //class Car //{ // public $color; // public $type; //} //$myCar = new Car(); $myCar->color = 'red'; $myCar->type = 'sedan'; //$yourCar = new Car(); $yourCar->color = 'blue'; $yourCar->type = 'suv'; $cars = array($myCar, $yourCar); print_r($cars); foreach ($cars as $car) { echo 'This car is a ' . $car->color . ' ' . $car->type . "\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 24
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/L9Zbp
function name:  (null)
number of ops:  26
compiled vars:  !0 = $myCar, !1 = $yourCar, !2 = $cars, !3 = $car
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN_OBJ                                               !0, 'color'
          1        OP_DATA                                                  'red'
   12     2        ASSIGN_OBJ                                               !0, 'type'
          3        OP_DATA                                                  'sedan'
   15     4        ASSIGN_OBJ                                               !1, 'color'
          5        OP_DATA                                                  'blue'
   16     6        ASSIGN_OBJ                                               !1, 'type'
          7        OP_DATA                                                  'suv'
   18     8        INIT_ARRAY                                       ~8      !0
          9        ADD_ARRAY_ELEMENT                                ~8      !1
         10        ASSIGN                                                   !2, ~8
   20    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   21    14      > FE_RESET_R                                       $11     !2, ->24
         15    > > FE_FETCH_R                                               $11, !3, ->24
   22    16    >   FETCH_OBJ_R                                      ~12     !3, 'color'
         17        CONCAT                                           ~13     'This+car+is+a+', ~12
         18        CONCAT                                           ~14     ~13, '+'
         19        FETCH_OBJ_R                                      ~15     !3, 'type'
         20        CONCAT                                           ~16     ~14, ~15
         21        CONCAT                                           ~17     ~16, '%0A'
         22        ECHO                                                     ~17
   21    23      > JMP                                                      ->15
         24    >   FE_FREE                                                  $11
   25    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.2 ms | 1395 KiB | 15 Q