3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list1 = new \SplDoublyLinkedList(); $list1->push(1); $list1->push(2); $list2 = clone $list1; $list2->push(3); $list2->push(4); var_export(iterator_to_array($list1)); print "\n"; var_export(iterator_to_array($list2)); print "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1v5j
function name:  (null)
number of ops:  32
compiled vars:  !0 = $list1, !1 = $list2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SplDoublyLinkedList'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        INIT_METHOD_CALL                                         !0, 'push'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
    6     6        INIT_METHOD_CALL                                         !0, 'push'
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
    8     9        CLONE                                            ~7      !0
         10        ASSIGN                                                   !1, ~7
    9    11        INIT_METHOD_CALL                                         !1, 'push'
         12        SEND_VAL_EX                                              3
         13        DO_FCALL                                      0          
   10    14        INIT_METHOD_CALL                                         !1, 'push'
         15        SEND_VAL_EX                                              4
         16        DO_FCALL                                      0          
   12    17        INIT_FCALL                                               'var_export'
         18        INIT_FCALL                                               'iterator_to_array'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
   13    23        ECHO                                                     '%0A'
   14    24        INIT_FCALL                                               'var_export'
         25        INIT_FCALL                                               'iterator_to_array'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $13     
         28        SEND_VAR                                                 $13
         29        DO_ICALL                                                 
   15    30        ECHO                                                     '%0A'
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.55 ms | 1438 KiB | 15 Q