3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { } class Bike { } function compareCars(array $cars) { array_walk($cars, function(Car $value) {}); } $cars1 = [new Car(), new Car()]; $cars2 = [new Car(), new Bike()]; compareCars($cars1); compareCars($cars2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6YZ0r
function name:  (null)
number of ops:  21
compiled vars:  !0 = $cars1, !1 = $cars2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'Car'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        NEW                                              $5      'Car'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~4      $5
          6        ASSIGN                                                   !0, ~4
   17     7        NEW                                              $8      'Car'
          8        DO_FCALL                                      0          
          9        INIT_ARRAY                                       ~10     $8
         10        NEW                                              $11     'Bike'
         11        DO_FCALL                                      0          
         12        ADD_ARRAY_ELEMENT                                ~10     $11
         13        ASSIGN                                                   !1, ~10
   19    14        INIT_FCALL                                               'comparecars'
         15        SEND_VAR                                                 !0
         16        DO_FCALL                                      0          
   20    17        INIT_FCALL                                               'comparecars'
         18        SEND_VAR                                                 !1
         19        DO_FCALL                                      0          
         20      > RETURN                                                   1

Function comparecars:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6YZ0r
function name:  compareCars
number of ops:  7
compiled vars:  !0 = $cars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6YZ0r%3A13%240'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   14     6      > RETURN                                                   null

End of function comparecars

Function %00%7Bclosure%7D%2Fin%2F6YZ0r%3A13%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6YZ0r
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6YZ0r%3A13%240

Class Car: [no user functions]
Class Bike: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.77 ms | 1399 KiB | 17 Q