3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.75 ms | 1396 KiB | 19 Q