3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = "-\r-\r\n-\n-"; var_dump(bin2hex($code)); $code = str_replace("\r\n", "\n", $code); var_dump(bin2hex($code)); $code = str_replace(array("\r\n", "\r"), "\n", $code); var_dump(bin2hex($code));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0tHBd
function name:  (null)
number of ops:  32
compiled vars:  !0 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '-%0D-%0D%0A-%0A-'
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'bin2hex'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%0D%0A'
          9        SEND_VAL                                                 '%0A'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    5    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'bin2hex'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $6      
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                                 
    6    19        INIT_FCALL                                               'str_replace'
         20        SEND_VAL                                                 <array>
         21        SEND_VAL                                                 '%0A'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $8      
         24        ASSIGN                                                   !0, $8
    7    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'bin2hex'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $10     
         29        SEND_VAR                                                 $10
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.29 ms | 1395 KiB | 19 Q