3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host = "localhost"; $port = 0; // oder false oder '' ... var_dump($host . ($port)); echo $host . ($port) ? ':' . $port : ''; // ergibt ':' ??? // Aber: echo $host; echo ($port) ? ':' . $port : ''; // ergibt 'localhost' (meine Erwartung für beide Varianten) ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
Branch analysis from position: 18
filename:       /in/vcOlT
function name:  (null)
number of ops:  21
compiled vars:  !0 = $host, !1 = $port
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'localhost'
    3     1        ASSIGN                                                   !1, 0
    5     2        INIT_FCALL                                               'var_dump'
          3        CONCAT                                           ~4      !0, !1
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                                 
    7     6        CONCAT                                           ~6      !0, !1
          7      > JMPZ                                                     ~6, ->11
          8    >   CONCAT                                           ~7      '%3A', !1
          9        QM_ASSIGN                                        ~8      ~7
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~8      ''
         12    >   ECHO                                                     ~8
   10    13        ECHO                                                     !0
   11    14      > JMPZ                                                     !1, ->18
         15    >   CONCAT                                           ~9      '%3A', !1
         16        QM_ASSIGN                                        ~10     ~9
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~10     ''
         19    >   ECHO                                                     ~10
   13    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.29 ms | 1395 KiB | 15 Q