3v4l.org

run code in 300+ PHP versions simultaneously
<?php function profiler($a, $b, $c) { $profiler = true; switch (true) { case $a; case $b; case $c; $profiler = false; } return $profiler; } // last true echo 'Truerue:'; var_dump(true, true, true); var_dump(false, false, true); var_dump(true, false, true); var_dump(false, true, true); // last not true echo 'Not true:'; var_dump(false, false, false); var_dump(true, false, false); var_dump(false, true, false); var_dump(true, true, false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DqMev
function name:  (null)
number of ops:  43
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'Truerue%3A'
   20     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 <true>
          3        SEND_VAL                                                 <true>
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                                 
   21     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAL                                                 <false>
          8        SEND_VAL                                                 <false>
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                                 
   22    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 <true>
         13        SEND_VAL                                                 <false>
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                                 
   23    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAL                                                 <false>
         18        SEND_VAL                                                 <true>
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                                 
   27    21        ECHO                                                     'Not+true%3A'
   28    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAL                                                 <false>
         24        SEND_VAL                                                 <false>
         25        SEND_VAL                                                 <false>
         26        DO_ICALL                                                 
   29    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAL                                                 <true>
         29        SEND_VAL                                                 <false>
         30        SEND_VAL                                                 <false>
         31        DO_ICALL                                                 
   30    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAL                                                 <false>
         34        SEND_VAL                                                 <true>
         35        SEND_VAL                                                 <false>
         36        DO_ICALL                                                 
   31    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAL                                                 <true>
         39        SEND_VAL                                                 <true>
         40        SEND_VAL                                                 <false>
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Function profiler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
Branch analysis from position: 8
filename:       /in/DqMev
function name:  profiler
number of ops:  11
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $profiler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    5     3        ASSIGN                                                   !3, <true>
    9     4      > JMPNZ                                                    !0, ->8
   10     5    > > JMPNZ                                                    !1, ->8
   11     6    > > JMPNZ                                                    !2, ->8
          7    > > JMP                                                      ->9
   12     8    >   ASSIGN                                                   !3, <false>
   15     9    > > RETURN                                                   !3
   16    10*     > RETURN                                                   null

End of function profiler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.63 ms | 1400 KiB | 15 Q