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); $code3 = strtr($code, array( "\r\n" => "\n", "\r" => "\n" )); $hex = bin2hex($code3); var_dump($hex);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/idvHm
function name:  (null)
number of ops:  47
compiled vars:  !0 = $code, !1 = $hex, !2 = $code1, !3 = $code2, !4 = $code3
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                                         $6      
          4        ASSIGN                                                   !1, $6
    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                                         $9      
         13        ASSIGN                                                   !2, $9
    8    14        INIT_FCALL                                               'bin2hex'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !1, $11
    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                                         $14     
         26        ASSIGN                                                   !3, $14
   12    27        INIT_FCALL                                               'bin2hex'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $16     
         30        ASSIGN                                                   !1, $16
   13    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                                 
   15    34        INIT_FCALL                                               'strtr'
         35        SEND_VAR                                                 !0
   16    36        SEND_VAL                                                 <array>
         37        DO_ICALL                                         $19     
   15    38        ASSIGN                                                   !4, $19
   19    39        INIT_FCALL                                               'bin2hex'
         40        SEND_VAR                                                 !4
         41        DO_ICALL                                         $21     
         42        ASSIGN                                                   !1, $21
   20    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !1
         45        DO_ICALL                                                 
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.43 ms | 1400 KiB | 21 Q