3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = time(); register_shutdown_function(function() use ($start){ sleep(2); printf("we are still running, for about %s seconds.", time()-$start); }); set_time_limit(1); sleep(2); echo "this will trigger the timeout";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bjt8H
function name:  (null)
number of ops:  16
compiled vars:  !0 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
    3     3        INIT_FCALL                                               'register_shutdown_function'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBjt8H%3A3%240'
          5        BIND_LEXICAL                                             ~3, !0
    6     6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'set_time_limit'
          9        SEND_VAL                                                 1
         10        DO_ICALL                                                 
    8    11        INIT_FCALL                                               'sleep'
         12        SEND_VAL                                                 2
         13        DO_ICALL                                                 
    9    14        ECHO                                                     'this+will+trigger+the+timeout'
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBjt8H%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bjt8H
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_STATIC                                              !0
    4     1        INIT_FCALL                                               'sleep'
          2        SEND_VAL                                                 2
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'printf'
          5        SEND_VAL                                                 'we+are+still+running%2C+for+about+%25s+seconds.'
          6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $2      
          8        SUB                                              ~3      $2, !0
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
    6    11      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBjt8H%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.76 ms | 1388 KiB | 23 Q