3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); // keep calling microtime for about 3 seconds while(microtime(true) - $start < 3) { } $data = getrusage(); echo "User time: ". ($data['ru_utime.tv_sec'] + $data['ru_utime.tv_usec'] / 1000000); echo "System time: ". ($data['ru_stime.tv_sec'] + $data['ru_stime.tv_usec'] / 1000000); /* prints User time: 1.088171 System time: 1.675315 */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/hiuOZ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $start, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4      > JMP                                                      ->5
          5    >   INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $4      
          8        SUB                                              ~5      $4, !0
          9        IS_SMALLER                                               ~5, 3
         10      > JMPNZ                                                    ~6, ->5
    8    11    >   INIT_FCALL                                               'getrusage'
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   10    14        FETCH_DIM_R                                      ~9      !1, 'ru_utime.tv_sec'
   11    15        FETCH_DIM_R                                      ~10     !1, 'ru_utime.tv_usec'
         16        DIV                                              ~11     ~10, 1000000
         17        ADD                                              ~12     ~9, ~11
         18        CONCAT                                           ~13     'User+time%3A+', ~12
         19        ECHO                                                     ~13
   13    20        FETCH_DIM_R                                      ~14     !1, 'ru_stime.tv_sec'
   14    21        FETCH_DIM_R                                      ~15     !1, 'ru_stime.tv_usec'
         22        DIV                                              ~16     ~15, 1000000
         23        ADD                                              ~17     ~14, ~16
         24        CONCAT                                           ~18     'System+time%3A+', ~17
         25        ECHO                                                     ~18
   19    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.2 ms | 1395 KiB | 17 Q