3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sms = "Not sure why it sent twice :/ hmmm lets hope I didn't put a bug in the code :( trying again :* <3"; while(strlen($sms) > 160) { echo "Here"; $short = substr($sms,0,159); echo "Send SMS Long"; $sms = str_replace($short,'',$sms); } if(strlen($sms) > 0) { echo "Send SMS Short"; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 2
Branch analysis from position: 19
Branch analysis from position: 2
filename:       /in/QaUZQ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $sms, !1 = $short
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Not+sure+why+it+sent+twice+%3A%2F+hmmm+lets+hope+I+didn%27t+put+a+bug+in+the+code%0A%3A%28+trying+again+%3A%2A+%3C3'
    6     1      > JMP                                                      ->16
    7     2    >   ECHO                                                     'Here'
    8     3        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 159
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !1, $3
    9     9        ECHO                                                     'Send+SMS+Long'
   10    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 ''
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        ASSIGN                                                   !0, $5
    6    16    >   STRLEN                                           ~7      !0
         17        IS_SMALLER                                               160, ~7
         18      > JMPNZ                                                    ~8, ->2
   13    19    >   STRLEN                                           ~9      !0
         20        IS_SMALLER                                               0, ~9
         21      > JMPZ                                                     ~10, ->23
   14    22    >   ECHO                                                     'Send+SMS+Short'
   20    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.01 ms | 1395 KiB | 17 Q