3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Compare two non numeric strings: ('str' == '0') = " . ('str' == '0' ? 'true' : 'false') . "\n"; echo "Compare non numeric string to intteger 0: ('str' == 0) = " . ('str' == 0 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic 1): ('1e1' == '10') = " . ('1e1' == '10' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic 2): ('+1' == '1') = " . ('+1' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same senamtic 3): ('+0' == '-0') = " . ('+0' == '-0' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision 1): ('0.99999999999999994' == '1') = " . ('0.99999999999999994' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision 2): ('0.99999999999999995' == '1') = " . ('0.99999999999999995' == '1' ? 'true' : 'false') . "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
Branch analysis from position: 45
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
Branch analysis from position: 38
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
Branch analysis from position: 31
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
Branch analysis from position: 24
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
Branch analysis from position: 17
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
Branch analysis from position: 10
filename:       /in/8oDLi
function name:  (null)
number of ops:  50
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > JMPZ                                                     <false>, ->3
          1    >   QM_ASSIGN                                        ~0      'true'
          2      > JMP                                                      ->4
          3    >   QM_ASSIGN                                        ~0      'false'
          4    >   CONCAT                                           ~1      'Compare+two+non+numeric+strings%3A++++++++++%28%27str%27+%3D%3D+%270%27%29+%3D+', ~0
          5        CONCAT                                           ~2      ~1, '%0A'
          6        ECHO                                                     ~2
    4     7      > JMPZ                                                     <false>, ->10
          8    >   QM_ASSIGN                                        ~3      'true'
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~3      'false'
         11    >   CONCAT                                           ~4      'Compare+non+numeric+string+to+intteger+0%3A+%28%27str%27+%3D%3D+0%29+++%3D+', ~3
         12        CONCAT                                           ~5      ~4, '%0A'
         13        ECHO                                                     ~5
    6    14      > JMPZ                                                     <true>, ->17
         15    >   QM_ASSIGN                                        ~6      'true'
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~6      'false'
         18    >   CONCAT                                           ~7      'Compare+two+numeric+strings+%28same+senamtic+1%29%3A+%28%271e1%27+%3D%3D+%2710%27%29+%3D+', ~6
         19        CONCAT                                           ~8      ~7, '%0A'
         20        ECHO                                                     ~8
    7    21      > JMPZ                                                     <true>, ->24
         22    >   QM_ASSIGN                                        ~9      'true'
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~9      'false'
         25    >   CONCAT                                           ~10     'Compare+two+numeric+strings+%28same+senamtic+2%29%3A+%28%27%2B1%27+%3D%3D+%271%27%29+++%3D+', ~9
         26        CONCAT                                           ~11     ~10, '%0A'
         27        ECHO                                                     ~11
    8    28      > JMPZ                                                     <true>, ->31
         29    >   QM_ASSIGN                                        ~12     'true'
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~12     'false'
         32    >   CONCAT                                           ~13     'Compare+two+numeric+strings+%28same+senamtic+3%29%3A+%28%27%2B0%27+%3D%3D+%27-0%27%29++%3D+', ~12
         33        CONCAT                                           ~14     ~13, '%0A'
         34        ECHO                                                     ~14
   10    35      > JMPZ                                                     <false>, ->38
         36    >   QM_ASSIGN                                        ~15     'true'
         37      > JMP                                                      ->39
         38    >   QM_ASSIGN                                        ~15     'false'
         39    >   CONCAT                                           ~16     'Compare+two+numeric+strings+%28precision+1%29%3A+%28%270.99999999999999994%27+%3D%3D+%271%27%29+%3D+', ~15
         40        CONCAT                                           ~17     ~16, '%0A'
         41        ECHO                                                     ~17
   11    42      > JMPZ                                                     <true>, ->45
         43    >   QM_ASSIGN                                        ~18     'true'
         44      > JMP                                                      ->46
         45    >   QM_ASSIGN                                        ~18     'false'
         46    >   CONCAT                                           ~19     'Compare+two+numeric+strings+%28precision+2%29%3A+%28%270.99999999999999995%27+%3D%3D+%271%27%29+%3D+', ~18
         47        CONCAT                                           ~20     ~19, '%0A'
         48        ECHO                                                     ~20
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.84 ms | 1399 KiB | 13 Q