3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($n) { return intval($n); } $a="3"; switch($a) { case test($a): echo "Yeah"; break; default: echo "Nope"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
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: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
filename:       /in/A7lmr
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, '3'
    9     1        INIT_FCALL                                               'test'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        IS_EQUAL                                                 !0, $3
          5      > JMPNZ                                                    ~2, ->7
          6    > > JMP                                                      ->9
   10     7    >   ECHO                                                     'Yeah'
   11     8      > JMP                                                      ->10
   13     9    >   ECHO                                                     'Nope'
   14    10    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A7lmr
function name:  test
number of ops:  4
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        CAST                                          4  ~1      !0
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.73 ms | 1401 KiB | 14 Q