3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new \stdClass(); $a->foo = 'bar'; $b = clone $a; $ah = spl_object_hash($a); $bh = spl_object_hash($b); echo $ah . PHP_EOL; echo $bh . PHP_EOL; echo $ah == $bh ? 'true' : 'false';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RkNP8
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $b, !2 = $ah, !3 = $bh
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'bar'
    5     5        CLONE                                            ~8      !0
          6        ASSIGN                                                   !1, ~8
    7     7        INIT_FCALL                                               'spl_object_hash'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !2, $10
    8    11        INIT_FCALL                                               'spl_object_hash'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
   10    15        CONCAT                                           ~14     !2, '%0A'
         16        ECHO                                                     ~14
   11    17        CONCAT                                           ~15     !3, '%0A'
         18        ECHO                                                     ~15
   12    19        IS_EQUAL                                                 !2, !3
         20      > JMPZ                                                     ~16, ->23
         21    >   QM_ASSIGN                                        ~17     'true'
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~17     'false'
         24    >   ECHO                                                     ~17
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.17 ms | 1400 KiB | 15 Q