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, Not sure why it sent twice :/ hmmm lets hope I didn't put a bug in the code :( trying again :* <3, Not sure why it sent twice :/ hmmm lets hope I didn't put a bug in the code :( trying again :* <3, Not sure why it sent twice :/ hmmm lets hope I didn't put a bug in the code :( trying again :* <3"; echo strlen($sms) . "\n"; while(strlen($sms) > 160) { echo "Here\n"; $short = substr($sms,0,159); echo "Send SMS Long: " . strlen($sms) . "\n" ; $sms = str_replace($short,'',$sms); } if(strlen($sms) > 0) { echo "Send SMS Short: " . strlen($sms) . "\n"; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 5
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 5
Branch analysis from position: 25
Branch analysis from position: 5
filename:       /in/YaZ0G
function name:  (null)
number of ops:  33
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%2C+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%2C+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%2C+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'
    8     1        STRLEN                                           ~3      !0
          2        CONCAT                                           ~4      ~3, '%0A'
          3        ECHO                                                     ~4
   10     4      > JMP                                                      ->22
   11     5    >   ECHO                                                     'Here%0A'
   12     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 159
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
   13    12        STRLEN                                           ~7      !0
         13        CONCAT                                           ~8      'Send+SMS+Long%3A+', ~7
         14        CONCAT                                           ~9      ~8, '%0A'
         15        ECHO                                                     ~9
   14    16        INIT_FCALL                                               'str_replace'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 ''
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !0, $10
   10    22    >   STRLEN                                           ~12     !0
         23        IS_SMALLER                                               160, ~12
         24      > JMPNZ                                                    ~13, ->5
   17    25    >   STRLEN                                           ~14     !0
         26        IS_SMALLER                                               0, ~14
         27      > JMPZ                                                     ~15, ->32
   18    28    >   STRLEN                                           ~16     !0
         29        CONCAT                                           ~17     'Send+SMS+Short%3A+', ~16
         30        CONCAT                                           ~18     ~17, '%0A'
         31        ECHO                                                     ~18
   24    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.8 ms | 1388 KiB | 17 Q