3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\r1|John|Smith|company name\r\naddress\r\nwhat they did\r\n2|Amy|Doe|company name\r"; $new = join("|",explode("\r\n",$str)); var_dump($new); $str = "\r|John|Smith|company name\r\naddress\r\nwhat they did\r\n|Amy|Doe|company name\r"; $new = join("|",explode("\r\n\t",$str)); var_dump($new);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PaNoT
function name:  (null)
number of ops:  27
compiled vars:  !0 = $str, !1 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%0D1%7CJohn%7CSmith%7Ccompany+name%0D%0Aaddress%0D%0Awhat+they+did%0D%0A2%7CAmy%7CDoe%7Ccompany+name%0D'
    3     1        INIT_FCALL                                               'join'
          2        SEND_VAL                                                 '%7C'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%0D%0A'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    4    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    6    13        ASSIGN                                                   !0, '%0D%7CJohn%7CSmith%7Ccompany+name%0D%0Aaddress%0D%0Awhat+they+did%0D%0A%7CAmy%7CDoe%7Ccompany+name%0D'
    7    14        INIT_FCALL                                               'join'
         15        SEND_VAL                                                 '%7C'
         16        INIT_FCALL                                               'explode'
         17        SEND_VAL                                                 '%0D%0A%09'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                         $9      
         22        ASSIGN                                                   !1, $9
    8    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.33 ms | 1395 KiB | 19 Q