3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $start = microtime(true); $object = new \stdClass; while ($i < 1000000) { is_null("foo"); is_null(null); is_null(12345); is_null($object); $i++; } $end = microtime(true); var_dump($end - $start); $i = 0; $start = microtime(true); $object = new \stdClass; while ($i < 1000000) { null === "foo"; null === null; null === 12345; null === $object; $i++; } $end = microtime(true); var_dump($end - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 9
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 37
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 37
Branch analysis from position: 42
Branch analysis from position: 37
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 9
Branch analysis from position: 20
Branch analysis from position: 9
filename:       /in/15U7k
function name:  (null)
number of ops:  51
compiled vars:  !0 = $i, !1 = $start, !2 = $object, !3 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    4     5        NEW                                              $7      'stdClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $7
    5     8      > JMP                                                      ->18
    6     9    >   TYPE_CHECK                                    2  ~10     'foo'
         10        FREE                                                     ~10
    7    11        TYPE_CHECK                                    2  ~11     null
         12        FREE                                                     ~11
    8    13        TYPE_CHECK                                    2  ~12     12345
         14        FREE                                                     ~12
    9    15        TYPE_CHECK                                    2  ~13     !2
         16        FREE                                                     ~13
   10    17        PRE_INC                                                  !0
    5    18    >   IS_SMALLER                                               !0, 1000000
         19      > JMPNZ                                                    ~15, ->9
   12    20    >   INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !3, $16
   14    24        INIT_FCALL                                               'var_dump'
         25        SUB                                              ~18     !3, !1
         26        SEND_VAL                                                 ~18
         27        DO_ICALL                                                 
   16    28        ASSIGN                                                   !0, 0
   17    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $21     
         32        ASSIGN                                                   !1, $21
   18    33        NEW                                              $23     'stdClass'
         34        DO_FCALL                                      0          
         35        ASSIGN                                                   !2, $23
   19    36      > JMP                                                      ->40
   23    37    >   TYPE_CHECK                                    2  ~26     !2
         38        FREE                                                     ~26
   24    39        PRE_INC                                                  !0
   19    40    >   IS_SMALLER                                               !0, 1000000
         41      > JMPNZ                                                    ~28, ->37
   26    42    >   INIT_FCALL                                               'microtime'
         43        SEND_VAL                                                 <true>
         44        DO_ICALL                                         $29     
         45        ASSIGN                                                   !3, $29
   28    46        INIT_FCALL                                               'var_dump'
         47        SUB                                              ~31     !3, !1
         48        SEND_VAL                                                 ~31
         49        DO_ICALL                                                 
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.26 ms | 1405 KiB | 17 Q