3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!function_exists('pCount')){ function pCount(){ global $x; if($x>5){ sleep(1); pCount(); }else{ $x++; return; } } } echo $x."<br>"; pCount(); echo $x."<br>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/krjHW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'pCount'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
    3     5    >   DECLARE_FUNCTION                                         'pcount'
   15     6    >   CONCAT                                           ~3      !0, '%3Cbr%3E'
          7        ECHO                                                     ~3
   16     8        INIT_FCALL_BY_NAME                                       'pCount'
          9        DO_FCALL                                      0          
   17    10        CONCAT                                           ~5      !0, '%3Cbr%3E'
         11        ECHO                                                     ~5
         12      > RETURN                                                   1

Function %00pcount%2Fin%2FkrjHW%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/krjHW
function name:  pCount
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'x'
    5     1        IS_SMALLER                                               5, !0
          2      > JMPZ                                                     ~1, ->9
    6     3    >   INIT_FCALL                                               'sleep'
          4        SEND_VAL                                                 1
          5        DO_ICALL                                                 
    7     6        INIT_FCALL_BY_NAME                                       'pCount'
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->11
    9     9    >   PRE_INC                                                  !0
   10    10      > RETURN                                                   null
   12    11    > > RETURN                                                   null

End of function %00pcount%2Fin%2FkrjHW%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.36 ms | 1396 KiB | 17 Q