3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; define ('null', 1); $start = microtime(true); for ($i=0;$i<10000;$i++) { $a = \is_null($i); } var_dump(microtime(true) - $start); $start = microtime(true); for ($i=0;$i<10000;$i++) { $a = null === $i; } var_dump(microtime(true) - $start);
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 = 15, Position 2 = 10
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 28
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 28
Branch analysis from position: 33
Branch analysis from position: 28
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 10
Branch analysis from position: 15
Branch analysis from position: 10
filename:       /in/UNihE
function name:  (null)
number of ops:  41
compiled vars:  !0 = $start, !1 = $i, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cdefine'
          1        SEND_VAL_EX                                              'null'
          2        SEND_VAL_EX                                              1
          3        DO_FCALL                                      0          
    6     4        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cmicrotime'
          5        SEND_VAL_EX                                              <true>
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !0, $4
    7     8        ASSIGN                                                   !1, 0
          9      > JMP                                                      ->13
    8    10    >   TYPE_CHECK                                    2  ~7      !1
         11        ASSIGN                                                   !2, ~7
    7    12        PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, 10000
         14      > JMPNZ                                                    ~10, ->10
   11    15    >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
         16        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cmicrotime'
         17        SEND_VAL_EX                                              <true>
         18        DO_FCALL                                      0  $11     
         19        SUB                                              ~12     $11, !0
         20        SEND_VAL_EX                                              ~12
         21        DO_FCALL                                      0          
   13    22        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cmicrotime'
         23        SEND_VAL_EX                                              <true>
         24        DO_FCALL                                      0  $14     
         25        ASSIGN                                                   !0, $14
   14    26        ASSIGN                                                   !1, 0
         27      > JMP                                                      ->31
   15    28    >   TYPE_CHECK                                    2  ~17     !1
         29        ASSIGN                                                   !2, ~17
   14    30        PRE_INC                                                  !1
         31    >   IS_SMALLER                                               !1, 10000
         32      > JMPNZ                                                    ~20, ->28
   18    33    >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
         34        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cmicrotime'
         35        SEND_VAL_EX                                              <true>
         36        DO_FCALL                                      0  $21     
         37        SUB                                              ~22     $21, !0
         38        SEND_VAL_EX                                              ~22
         39        DO_FCALL                                      0          
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.86 ms | 1400 KiB | 19 Q