3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n=100000; $a=1; $b=2; $start=microtime(1); for($i=1;$i<=$n;$i++) { if ($a!=$b) $c=$a+$b;else $c=8; } print (microtime(1)-$start).'<br>'; $start=microtime(1); for($i=1;$i<=$n;$i++) { $c=($a!=$b)?($a+$b):8; } print (microtime(1)-$start).'<br>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 30
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 35
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 30
Branch analysis from position: 40
Branch analysis from position: 30
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 30
Branch analysis from position: 40
Branch analysis from position: 30
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
Branch analysis from position: 9
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
Branch analysis from position: 9
filename:       /in/7AYBE
function name:  (null)
number of ops:  47
compiled vars:  !0 = $n, !1 = $a, !2 = $b, !3 = $start, !4 = $i, !5 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 100000
    4     1        ASSIGN                                                   !1, 1
    5     2        ASSIGN                                                   !2, 2
    7     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !3, $9
    9     7        ASSIGN                                                   !4, 1
          8      > JMP                                                      ->16
   10     9    >   IS_NOT_EQUAL                                             !1, !2
         10      > JMPZ                                                     ~12, ->14
         11    >   ADD                                              ~13     !1, !2
         12        ASSIGN                                                   !5, ~13
         13      > JMP                                                      ->15
         14    >   ASSIGN                                                   !5, 8
    9    15    >   PRE_INC                                                  !4
         16    >   IS_SMALLER_OR_EQUAL                                      !4, !0
         17      > JMPNZ                                                    ~17, ->9
   13    18    >   INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $18     
         21        SUB                                              ~19     $18, !3
         22        CONCAT                                           ~20     ~19, '%3Cbr%3E'
         23        ECHO                                                     ~20
   15    24        INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 1
         26        DO_ICALL                                         $21     
         27        ASSIGN                                                   !3, $21
   17    28        ASSIGN                                                   !4, 1
         29      > JMP                                                      ->38
   18    30    >   IS_NOT_EQUAL                                             !1, !2
         31      > JMPZ                                                     ~24, ->35
         32    >   ADD                                              ~25     !1, !2
         33        QM_ASSIGN                                        ~26     ~25
         34      > JMP                                                      ->36
         35    >   QM_ASSIGN                                        ~26     8
         36    >   ASSIGN                                                   !5, ~26
   17    37        PRE_INC                                                  !4
         38    >   IS_SMALLER_OR_EQUAL                                      !4, !0
         39      > JMPNZ                                                    ~29, ->30
   21    40    >   INIT_FCALL                                               'microtime'
         41        SEND_VAL                                                 1
         42        DO_ICALL                                         $30     
         43        SUB                                              ~31     $30, !3
         44        CONCAT                                           ~32     ~31, '%3Cbr%3E'
         45        ECHO                                                     ~32
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.01 ms | 1392 KiB | 15 Q