3v4l.org

run code in 300+ PHP versions simultaneously
<?php class workerThread extends \Thread { public function __construct($i){ $this->i=$i; } public function run(){ while(true){ echo $this->i; sleep(1); } } } for($i=0;$i<5;$i++){ $workers[$i]=new workerThread($i); $workers[$i]->start(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 3
Branch analysis from position: 14
Branch analysis from position: 3
filename:       /in/5aO40
function name:  (null)
number of ops:  15
compiled vars:  !0 = $i, !1 = $workers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'workerthread', 'thread'
   16     1        ASSIGN                                                   !0, 0
          2      > JMP                                                      ->12
   17     3    >   NEW                                              $4      'workerThread'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !1, !0
          7        OP_DATA                                                  $4
   18     8        FETCH_DIM_R                                      ~6      !1, !0
          9        INIT_METHOD_CALL                                         ~6, 'start'
         10        DO_FCALL                                      0          
   16    11        PRE_INC                                                  !0
         12    >   IS_SMALLER                                               !0, 5
         13      > JMPNZ                                                    ~9, ->3
   19    14    > > RETURN                                                   1

Class workerThread:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5aO40
function name:  __construct
number of ops:  4
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               'i'
          2        OP_DATA                                                  !0
    6     3      > RETURN                                                   null

End of function __construct

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 1
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 1
Branch analysis from position: 7
Branch analysis from position: 1
filename:       /in/5aO40
function name:  run
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > JMP                                                      ->6
   10     1    >   FETCH_OBJ_R                                      ~0      'i'
          2        ECHO                                                     ~0
   11     3        INIT_FCALL                                               'sleep'
          4        SEND_VAL                                                 1
          5        DO_ICALL                                                 
    9     6    > > JMPNZ                                                    <true>, ->1
   13     7    > > RETURN                                                   null

End of function run

End of class workerThread.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.36 ms | 1400 KiB | 15 Q