3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Node { private $next; public function setNext(Node $node = null) { $this->next = $node; return $this; } } class LinkedList { private $head; public function addNode() { $this->head = (new Node())->setNext($this->head); } } $ll = new LinkedList(); for ($i = 0; $i < 3150000; $i++) { $ll->addNode(); } echo "done no probs";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/vr2a8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $ll, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'LinkedList'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   22     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->8
   23     5    >   INIT_METHOD_CALL                                         !0, 'addNode'
          6        DO_FCALL                                      0          
   22     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 3150000
          9      > JMPNZ                                                    ~8, ->5
   25    10    >   ECHO                                                     'done+no+probs'
         11      > RETURN                                                   1

Class Node:
Function setnext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vr2a8
function name:  setNext
number of ops:  6
compiled vars:  !0 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      null
    7     1        ASSIGN_OBJ                                               'next'
          2        OP_DATA                                                  !0
    8     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
    9     5*     > RETURN                                                   null

End of function setnext

End of class Node.

Class LinkedList:
Function addnode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vr2a8
function name:  addNode
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Node'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'setNext'
          3        CHECK_FUNC_ARG                                           
          4        FETCH_OBJ_FUNC_ARG                               $3      'head'
          5        SEND_FUNC_ARG                                            $3
          6        DO_FCALL                                      0  $4      
          7        ASSIGN_OBJ                                               'head'
          8        OP_DATA                                                  $4
   17     9      > RETURN                                                   null

End of function addnode

End of class LinkedList.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.75 ms | 1395 KiB | 13 Q