3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Obj { public $num; public function __construct($num) { $this->num = $num; } } $arr = array(new Obj(1),new Obj(2),new Obj(3)); var_dump($arr); $arr = array_diff($arr,array(new Obj(2))); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pSLC4
function name:  (null)
number of ops:  29
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Obj'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~3      $1
          4        NEW                                              $4      'Obj'
          5        SEND_VAL_EX                                              2
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~3      $4
          8        NEW                                              $6      'Obj'
          9        SEND_VAL_EX                                              3
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~3      $6
         12        ASSIGN                                                   !0, ~3
   11    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   12    16        INIT_FCALL                                               'array_diff'
         17        SEND_VAR                                                 !0
         18        NEW                                              $10     'Obj'
         19        SEND_VAL_EX                                              2
         20        DO_FCALL                                      0          
         21        INIT_ARRAY                                       ~12     $10
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !0, $13
   13    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Class Obj:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pSLC4
function name:  __construct
number of ops:  4
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'num'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function __construct

End of class Obj.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.12 ms | 1396 KiB | 17 Q