3v4l.org

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

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.34 ms | 1395 KiB | 17 Q