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($short) . "\n" ; $sms = str_replace($short,'',$sms); echo $short . "\n"; } if(strlen($sms) > 0) { echo "Send SMS Short: " . strlen($sms) . "\n"; echo $sms . "\n"; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 5
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 36
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 5
Branch analysis from position: 27
Branch analysis from position: 5
filename:       /in/pVJfq
function name:  (null)
number of ops:  37
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                                                      ->24
   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      !1
         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
   15    22        CONCAT                                           ~12     !1, '%0A'
         23        ECHO                                                     ~12
   10    24    >   STRLEN                                           ~13     !0
         25        IS_SMALLER                                               160, ~13
         26      > JMPNZ                                                    ~14, ->5
   18    27    >   STRLEN                                           ~15     !0
         28        IS_SMALLER                                               0, ~15
         29      > JMPZ                                                     ~16, ->36
   19    30    >   STRLEN                                           ~17     !0
         31        CONCAT                                           ~18     'Send+SMS+Short%3A+', ~17
         32        CONCAT                                           ~19     ~18, '%0A'
         33        ECHO                                                     ~19
   20    34        CONCAT                                           ~20     !0, '%0A'
         35        ECHO                                                     ~20
   25    36    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.65 ms | 1400 KiB | 17 Q