3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = microtime(true); for ($i = 0; $i < 500000; $i++) { $p1 = ($i*mt_rand(10, 90)); $p2 = ($i*mt_rand(10, 90)); $p3 = ($i*mt_rand(10, 90)); function newf($p1, $p2, $p3) { return $p1 * $p2 * $p3; } } echo $s - microtime(true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
Branch analysis from position: 6
filename:       /in/8RpHu
function name:  (null)
number of ops:  34
compiled vars:  !0 = $s, !1 = $i, !2 = $p1, !3 = $p2, !4 = $p3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    5     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->26
    7     6    >   INIT_FCALL                                               'mt_rand'
          7        SEND_VAL                                                 10
          8        SEND_VAL                                                 90
          9        DO_ICALL                                         $8      
         10        MUL                                              ~9      !1, $8
         11        ASSIGN                                                   !2, ~9
    8    12        INIT_FCALL                                               'mt_rand'
         13        SEND_VAL                                                 10
         14        SEND_VAL                                                 90
         15        DO_ICALL                                         $11     
         16        MUL                                              ~12     !1, $11
         17        ASSIGN                                                   !3, ~12
    9    18        INIT_FCALL                                               'mt_rand'
         19        SEND_VAL                                                 10
         20        SEND_VAL                                                 90
         21        DO_ICALL                                         $14     
         22        MUL                                              ~15     !1, $14
         23        ASSIGN                                                   !4, ~15
   11    24        DECLARE_FUNCTION                                         'newf'
    5    25        PRE_INC                                                  !1
         26    >   IS_SMALLER                                               !1, 500000
         27      > JMPNZ                                                    ~18, ->6
   17    28    >   INIT_FCALL                                               'microtime'
         29        SEND_VAL                                                 <true>
         30        DO_ICALL                                         $19     
         31        SUB                                              ~20     !0, $19
         32        ECHO                                                     ~20
         33      > RETURN                                                   1

Function %00newf%2Fin%2F8RpHu%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8RpHu
function name:  newf
number of ops:  7
compiled vars:  !0 = $p1, !1 = $p2, !2 = $p3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   13     3        MUL                                              ~3      !0, !1
          4        MUL                                              ~4      !2, ~3
          5      > RETURN                                                   ~4
   14     6*     > RETURN                                                   null

End of function %00newf%2Fin%2F8RpHu%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.18 ms | 1400 KiB | 17 Q