3v4l.org

run code in 300+ PHP versions simultaneously
<?php $out1 = 'Hello World?'; $end = substr($out1,(strlen($out1)-1),strlen($out1)); if (($end != '.') || ($end != '?') || ($end != '!')) { $out1 = substr($out1, 0, -1).'.'; } echo $out1;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 17
Branch analysis from position: 14
filename:       /in/2XMnM
function name:  (null)
number of ops:  27
compiled vars:  !0 = $out1, !1 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Hello+World%3F'
    3     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        STRLEN                                           ~3      !0
          4        SUB                                              ~4      ~3, 1
          5        SEND_VAL                                                 ~4
          6        STRLEN                                           ~5      !0
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
    4    10        IS_NOT_EQUAL                                     ~8      !1, '.'
         11      > JMPNZ_EX                                         ~8      ~8, ->14
         12    >   IS_NOT_EQUAL                                     ~9      !1, '%3F'
         13        BOOL                                             ~8      ~9
         14    > > JMPNZ_EX                                         ~8      ~8, ->17
         15    >   IS_NOT_EQUAL                                     ~10     !1, '%21'
         16        BOOL                                             ~8      ~10
         17    > > JMPZ                                                     ~8, ->25
    6    18    >   INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 -1
         22        DO_ICALL                                         $11     
         23        CONCAT                                           ~12     $11, '.'
         24        ASSIGN                                                   !0, ~12
    8    25    >   ECHO                                                     !0
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.5 ms | 1399 KiB | 15 Q