3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=0; 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 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/cSMot
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        INIT_FCALL                                               'function_exists'
          2        SEND_VAL                                                 'pCount'
          3        DO_ICALL                                         $2      
          4        BOOL_NOT                                         ~3      $2
          5      > JMPZ                                                     ~3, ->7
    4     6    >   DECLARE_FUNCTION                                         'pcount'
   16     7    >   CONCAT                                           ~4      !0, '%3Cbr%3E'
          8        ECHO                                                     ~4
   17     9        INIT_FCALL_BY_NAME                                       'pCount'
         10        DO_FCALL                                      0          
   18    11        CONCAT                                           ~6      !0, '%3Cbr%3E'
         12        ECHO                                                     ~6
         13      > RETURN                                                   1

Function %00pcount%2Fin%2FcSMot%3A4%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/cSMot
function name:  pCount
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_GLOBAL                                              !0, 'x'
    6     1        IS_SMALLER                                               5, !0
          2      > JMPZ                                                     ~1, ->9
    7     3    >   INIT_FCALL                                               'sleep'
          4        SEND_VAL                                                 1
          5        DO_ICALL                                                 
    8     6        INIT_FCALL_BY_NAME                                       'pCount'
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->11
   10     9    >   PRE_INC                                                  !0
   11    10      > RETURN                                                   null
   13    11    > > RETURN                                                   null

End of function %00pcount%2Fin%2FcSMot%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.42 ms | 1388 KiB | 17 Q