3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $a = new Foo(); $a->x = 1; $a->y = 2; $b = new Foo(); $b->y = 2; $b->x = 1; var_dump( serialize($a), serialize($b), serialize($a) <=> serialize($b) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iI994
function name:  (null)
number of ops:  33
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    6     3        ASSIGN_OBJ                                               !0, 'x'
          4        OP_DATA                                                  1
    7     5        ASSIGN_OBJ                                               !0, 'y'
          6        OP_DATA                                                  2
    9     7        NEW                                              $7      'Foo'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   10    10        ASSIGN_OBJ                                               !1, 'y'
         11        OP_DATA                                                  2
   11    12        ASSIGN_OBJ                                               !1, 'x'
         13        OP_DATA                                                  1
   13    14        INIT_FCALL                                               'var_dump'
   14    15        INIT_FCALL                                               'serialize'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $12     
         18        SEND_VAR                                                 $12
   15    19        INIT_FCALL                                               'serialize'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
   16    23        INIT_FCALL                                               'serialize'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $14     
         26        INIT_FCALL                                               'serialize'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $15     
         29        SPACESHIP                                        ~16     $14, $15
         30        SEND_VAL                                                 ~16
   13    31        DO_ICALL                                                 
   17    32      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.74 ms | 1012 KiB | 15 Q