3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($disabled){ if($disabled == 1){ $disabled = 'disabled="disabled"'; }elseif($disabled == 0){ $disabled = ''; } echo '--_'.$disabled.'_--'; } test(0); test(''); test(1); test('disabled="disabled"');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HrkpM
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 0
          2        DO_FCALL                                      0          
   13     3        INIT_FCALL                                               'test'
          4        SEND_VAL                                                 ''
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'test'
          7        SEND_VAL                                                 1
          8        DO_FCALL                                      0          
   17     9        INIT_FCALL                                               'test'
         10        SEND_VAL                                                 'disabled%3D%22disabled%22'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/HrkpM
function name:  test
number of ops:  12
compiled vars:  !0 = $disabled
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~1, ->5
    4     3    >   ASSIGN                                                   !0, 'disabled%3D%22disabled%22'
          4      > JMP                                                      ->8
    5     5    >   IS_EQUAL                                                 !0, 0
          6      > JMPZ                                                     ~3, ->8
    6     7    >   ASSIGN                                                   !0, ''
    8     8    >   CONCAT                                           ~5      '--_', !0
          9        CONCAT                                           ~6      ~5, '_--'
         10        ECHO                                                     ~6
    9    11      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.07 ms | 1390 KiB | 17 Q