3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user = new stdClass(); $user->id = 1234567; $thisObj = new stdClass(); $user2 = new stdClass(); $user2->id = 1234567; $this->user = $user2; if($user->id != $thisObj->user->id){ echo "Does not work"; } else { echo "works"; }
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/QfM2G
function name:  (null)
number of ops:  25
compiled vars:  !0 = $user, !1 = $thisObj, !2 = $user2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN_OBJ                                               !0, 'id'
          4        OP_DATA                                                  1234567
    6     5        NEW                                              $7      'stdClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    7     8        NEW                                              $10     'stdClass'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
    8    11        ASSIGN_OBJ                                               !2, 'id'
         12        OP_DATA                                                  1234567
    9    13        FETCH_THIS                                       $14     
         14        ASSIGN_OBJ                                               $14, 'user'
         15        OP_DATA                                                  !2
   11    16        FETCH_OBJ_R                                      ~16     !0, 'id'
         17        FETCH_OBJ_R                                      ~17     !1, 'user'
         18        FETCH_OBJ_R                                      ~18     ~17, 'id'
         19        IS_NOT_EQUAL                                             ~16, ~18
         20      > JMPZ                                                     ~19, ->23
   12    21    >   ECHO                                                     'Does+not+work'
         22      > JMP                                                      ->24
   14    23    >   ECHO                                                     'works'
   15    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.96 ms | 1394 KiB | 13 Q