3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[AllowDynamicProperties] class Node { public $next; // forcing dynamic property creation is key } $first = new Node(); $first->previous = $first; $first->next = $first; $cur = $first; $new = new Node(); $new->previous = $cur; $cur->next = $new; $new->next = $first; $first->previous = $new; $cur = $new; try { // Force comparison manually to trigger zend_hash_compare $first == $cur; } catch(Error $e) { echo $e->getMessage(). PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 23
Branch analysis from position: 23
2 jumps found. (Code = 107) Position 1 = 24, Position 2 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gkKqd
function name:  (null)
number of ops:  29
compiled vars:  !0 = $first, !1 = $cur, !2 = $new, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $4      'Node'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   10     3        ASSIGN_OBJ                                               !0, 'previous'
          4        OP_DATA                                                  !0
   11     5        ASSIGN_OBJ                                               !0, 'next'
          6        OP_DATA                                                  !0
   13     7        ASSIGN                                                   !1, !0
   15     8        NEW                                              $10     'Node'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
   16    11        ASSIGN_OBJ                                               !2, 'previous'
         12        OP_DATA                                                  !1
   17    13        ASSIGN_OBJ                                               !1, 'next'
         14        OP_DATA                                                  !2
   18    15        ASSIGN_OBJ                                               !2, 'next'
         16        OP_DATA                                                  !0
   19    17        ASSIGN_OBJ                                               !0, 'previous'
         18        OP_DATA                                                  !2
   20    19        ASSIGN                                                   !1, !2
   24    20        IS_EQUAL                                         ~18     !0, !1
         21        FREE                                                     ~18
         22      > JMP                                                      ->28
   25    23  E > > CATCH                                       last         'Error'
   26    24    >   INIT_METHOD_CALL                                         !3, 'getMessage'
         25        DO_FCALL                                      0  $19     
         26        CONCAT                                           ~20     $19, '%0A'
         27        ECHO                                                     ~20
   27    28    > > RETURN                                                   1

Class Node: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.29 ms | 1000 KiB | 13 Q