3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(10); $startTime = microtime(true); $newTime = $startTime + 10; // + 10 sec while (true) { if($newTime >= $startTime) { break; } } echo 'Total execution time in seconds: ' . (microtime(true) - $startTime) . ' ' . $startTime . ' '. $newTime;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 10
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 13
filename:       /in/Pt0Ti
function name:  (null)
number of ops:  25
compiled vars:  !0 = $startTime, !1 = $newTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_time_limit'
          1        SEND_VAL                                                 10
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    4     7        ADD                                              ~5      !0, 10
          8        ASSIGN                                                   !1, ~5
    5     9      > JMP                                                      ->13
    6    10    >   IS_SMALLER_OR_EQUAL                                      !0, !1
         11      > JMPZ                                                     ~7, ->13
    7    12    > > JMP                                                      ->14
    5    13    > > JMPNZ                                                    <true>, ->10
   10    14    >   INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $8      
         17        SUB                                              ~9      $8, !0
         18        CONCAT                                           ~10     'Total+execution+time+in+seconds%3A+', ~9
         19        CONCAT                                           ~11     ~10, '+'
         20        CONCAT                                           ~12     ~11, !0
         21        CONCAT                                           ~13     ~12, '+'
         22        CONCAT                                           ~14     ~13, !1
         23        ECHO                                                     ~14
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.94 ms | 1395 KiB | 17 Q