3v4l.org

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

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

End of function %00pcount%2Fin%2FGsqP7%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
212.7 ms | 1396 KiB | 17 Q