3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stringFactory($len){ return "feed SET status_msg = '".str_repeat('a', $len)."\n[...]' WHERE feedname = 'some'"; } function stringCheck($len){ $str = stringFactory($len); var_dump(strlen($str)); $str = preg_replace("/'(?:[^'\\\\]|\\\\.)*'/", '?', $str); var_dump($str); echo PHP_EOL; } stringCheck(5); stringCheck(50); stringCheck(500); stringCheck(5000); stringCheck(50000); stringCheck(500000);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvTRB
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'stringcheck'
          1        SEND_VAL                                                 5
          2        DO_FCALL                                      0          
   17     3        INIT_FCALL                                               'stringcheck'
          4        SEND_VAL                                                 50
          5        DO_FCALL                                      0          
   18     6        INIT_FCALL                                               'stringcheck'
          7        SEND_VAL                                                 500
          8        DO_FCALL                                      0          
   19     9        INIT_FCALL                                               'stringcheck'
         10        SEND_VAL                                                 5000
         11        DO_FCALL                                      0          
   20    12        INIT_FCALL                                               'stringcheck'
         13        SEND_VAL                                                 50000
         14        DO_FCALL                                      0          
   21    15        INIT_FCALL                                               'stringcheck'
         16        SEND_VAL                                                 500000
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Function stringfactory:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvTRB
function name:  stringFactory
number of ops:  9
compiled vars:  !0 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'str_repeat'
          2        SEND_VAL                                                 'a'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        CONCAT                                           ~2      'feed+SET+status_msg+%3D+%27', $1
          6        CONCAT                                           ~3      ~2, '%0A%5B...%5D%27+WHERE+feedname+%3D+%27some%27'
          7      > RETURN                                                   ~3
    5     8*     > RETURN                                                   null

End of function stringfactory

Function stringcheck:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvTRB
function name:  stringCheck
number of ops:  20
compiled vars:  !0 = $len, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'stringfactory'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   10     5        INIT_FCALL                                               'var_dump'
          6        STRLEN                                           ~4      !1
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'preg_replace'
         10        SEND_VAL                                                 '%2F%27%28%3F%3A%5B%5E%27%5C%5C%5D%7C%5C%5C.%29%2A%27%2F'
         11        SEND_VAL                                                 '%3F'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !1, $6
   12    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   13    18        ECHO                                                     '%0A'
   14    19      > RETURN                                                   null

End of function stringcheck

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.12 ms | 1025 KiB | 23 Q