3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo '2 + 2 = ' . (((2 + 2) === 4) ? 4 : (((2 + 2) === 5) ? 5 : 'dunno')); // should output "4", right? RIGHT?
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
Jump found. Position 1 = 8
Branch analysis from position: 8
Jump found. Position 1 = -2
Branch analysis from position: 3
Jump found. Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
Jump found. Position 1 = 7
Branch analysis from position: 7
Jump found. Position 1 = -2
Branch analysis from position: 6
Jump found. Position 1 = -2
filename:       /in/7eIvR
function name:  (null)
number of ops:  11
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E > > JMPZ                                                     <true>, ->3
         1    >   QM_ASSIGN                                        ~0      4
         2      > JMP                                                      ->8
         3    > > JMPZ                                                     <false>, ->6
         4    >   QM_ASSIGN                                        ~1      5
         5      > JMP                                                      ->7
         6    >   QM_ASSIGN                                        ~1      'dunno'
         7    >   QM_ASSIGN                                        ~0      ~1
         8    >   CONCAT                                           ~2      '2+%2B+2+%3D+', ~0
         9        ECHO                                                     ~2
        10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0