3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); switch (pcntl_fork()) { case -1: die('problem'); break; case 0: $a = 234325; for ($i = 0; $i < 1000000; ++$i) { // wasting CPU $a *= $i; } break; default: pcntl_wait(); echo "the child took " . (microtime(true) - $start) . " micro seconds"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 16
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 16
Branch analysis from position: 20
Branch analysis from position: 16
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/WQWvA
function name:  (null)
number of ops:  32
compiled vars:  !0 = $start, !1 = $a, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL_BY_NAME                                       'pcntl_fork'
          5        DO_FCALL                                      0  $5      
          6        CASE                                                     $5, -1
          7      > JMPNZ                                                    ~6, ->11
   10     8    >   CASE                                                     $5, 0
          9      > JMPNZ                                                    ~6, ->13
         10    > > JMP                                                      ->21
    7    11    > > EXIT                                                     'problem'
    8    12*       JMP                                                      ->30
   11    13    >   ASSIGN                                                   !1, 234325
   12    14        ASSIGN                                                   !2, 0
         15      > JMP                                                      ->18
   14    16    >   ASSIGN_OP                                     3          !1, !2
   12    17        PRE_INC                                                  !2
         18    >   IS_SMALLER                                               !2, 1000000
         19      > JMPNZ                                                    ~11, ->16
   16    20    > > JMP                                                      ->30
   19    21    >   INIT_FCALL_BY_NAME                                       'pcntl_wait'
         22        DO_FCALL                                      0          
   20    23        INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $13     
         26        SUB                                              ~14     $13, !0
         27        CONCAT                                           ~15     'the+child+took+', ~14
         28        CONCAT                                           ~16     ~15, '+micro+seconds'
         29        ECHO                                                     ~16
         30    >   FREE                                                     $5
   21    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.95 ms | 1396 KiB | 15 Q