3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($arg) { return $arg; } $a['a'] = 'z'; echo test($a['a']?$a['a']:'a');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
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
filename:       /in/2lVfQ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_DIM                                               !0, 'a'
          1        OP_DATA                                                  'z'
    8     2        INIT_FCALL                                               'test'
          3        FETCH_DIM_R                                      ~2      !0, 'a'
          4      > JMPZ                                                     ~2, ->8
          5    >   FETCH_DIM_R                                      ~3      !0, 'a'
          6        QM_ASSIGN                                        ~4      ~3
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~4      'a'
          9    >   SEND_VAL                                                 ~4
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
         12      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.49 ms | 1397 KiB | 14 Q