3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyThread extends Thread { public function run(){ //do something time consuming } } $t = new MyThread(); if($t->start()){ while($t->isRunning()){ echo "."; usleep(100); } $t->join(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
Branch analysis from position: 8
Branch analysis from position: 17
filename:       /in/tmvCo
function name:  (null)
number of ops:  18
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'mythread', 'thread'
    9     1        NEW                                              $1      'MyThread'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   10     4        INIT_METHOD_CALL                                         !0, 'start'
          5        DO_FCALL                                      0  $4      
          6      > JMPZ                                                     $4, ->17
   11     7    > > JMP                                                      ->12
   12     8    >   ECHO                                                     '.'
   13     9        INIT_FCALL                                               'usleep'
         10        SEND_VAL                                                 100
         11        DO_ICALL                                                 
   11    12    >   INIT_METHOD_CALL                                         !0, 'isRunning'
         13        DO_FCALL                                      0  $6      
         14      > JMPNZ                                                    $6, ->8
   15    15    >   INIT_METHOD_CALL                                         !0, 'join'
         16        DO_FCALL                                      0          
   16    17    > > RETURN                                                   1

Class MyThread:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tmvCo
function name:  run
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   null

End of function run

End of class MyThread.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.46 ms | 1395 KiB | 15 Q