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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.35 ms | 1396 KiB | 17 Q