3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_plain($text) { return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); } $str = ' is an online shell that allows you to evaluate (hence 3v4l) your code on our servers. We support more than 100 different PHP versions (every version released since 4.3.0) plus HHVM for you to use. For every script you submit, we return: </p><ul> <li>Output from all released PHP and HHVM versions</li> <li>Output from all upcoming alpha &amp; beta PHP versions</li> <li><a href="http://derickrethans.nl/projects.html#vld">VLD</'; print strlen($str) . "\n"; $maxlength = 177; $cutlength = $maxlength; while (0 < $delta = $maxlength - strlen(check_plain(substr($str, 0, $cutlength)))) { $cutlength += $delta; } print substr($str, 0, $cutlength);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 7
Branch analysis from position: 21
Branch analysis from position: 7
filename:       /in/7ZbSt
function name:  (null)
number of ops:  28
compiled vars:  !0 = $str, !1 = $maxlength, !2 = $cutlength, !3 = $delta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, '+is+an+online+shell+that+allows+you+to+evaluate+%28hence+3v4l%29+your+code+on+our+servers.+We+support+more+than+100+different+PHP+versions+%28every+version+released+since+4.3.0%29+plus+HHVM+for+you+to+use.+For+every+script+you+submit%2C+we+return%3A%0A%09%09%3C%2Fp%3E%3Cul%3E%0A%09%09%09%3Cli%3EOutput+from+all+released+PHP+and+HHVM+versions%3C%2Fli%3E%0A%09%09%09%3Cli%3EOutput+from+all+upcoming+alpha+%26amp%3B+beta+PHP+versions%3C%2Fli%3E%0A%09%09%09%3Cli%3E%3Ca+href%3D%22http%3A%2F%2Fderickrethans.nl%2Fprojects.html%23vld%22%3EVLD%3C%2F'
   14     1        STRLEN                                           ~5      !0
          2        CONCAT                                           ~6      ~5, '%0A'
          3        ECHO                                                     ~6
   16     4        ASSIGN                                                   !1, 177
   18     5        ASSIGN                                                   !2, !1
   20     6      > JMP                                                      ->8
   21     7    >   ASSIGN_OP                                     1          !2, !3
   20     8    >   INIT_FCALL                                               'check_plain'
          9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 0
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_FCALL                                      0  $11     
         16        STRLEN                                           ~12     $11
         17        SUB                                              ~13     !1, ~12
         18        ASSIGN                                           ~14     !3, ~13
         19        IS_SMALLER                                               0, ~14
         20      > JMPNZ                                                    ~15, ->7
   24    21    >   INIT_FCALL                                               'substr'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 0
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $16     
         26        ECHO                                                     $16
         27      > RETURN                                                   1

Function check_plain:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ZbSt
function name:  check_plain
number of ops:  8
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'htmlspecialchars'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        SEND_VAL                                                 'UTF-8'
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    5     7*     > RETURN                                                   null

End of function check_plain

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.73 ms | 1403 KiB | 18 Q