3v4l.org

run code in 300+ PHP versions simultaneously
<? Php $Tmpdir = sys_get_temp_dir (); # Grab the temporary directory to save the file. $File = tempnam ( $tmpdir , 'ctk' ); # The name of the temporary file to be printed $Handle = fopen ( $file , 'w' ); $Condensed = Chr (27). Chr (33). Chr (4); $Bold1 = Chr (27). Chr (69); $Bold0 = Chr (27). Chr (70); $Initialized = chr (27). chr (64); $Condensed1 = chr (15); $Condensed0 = chr (18); $Data = $ initialized ; $Data . = $ condensed1 ; $Data . = "========================== \ n" ; $Data . = "|" . $bold1 . "OFIDZ MAJEZTY" . $bold0 . "| \ n" ; $Data . = "========================== \ n" ; $Data . = "Ofidz Majezty is here \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "-------------------------- \ n" ; fwrite ( $handle , $data ); fclose ( $handle ); copy ( $file , "/ / localhost / xprinter" ); #Perform print unlink ( $file ); ?>
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.28, 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<? Php $Tmpdir = sys_get_temp_dir (); # Grab the temporary directory to save the file. $File = tempnam ( $tmpdir , 'ctk' ); # The name of the temporary file to be printed $Handle = fopen ( $file , 'w' ); $Condensed = Chr (27). Chr (33). Chr (4); $Bold1 = Chr (27). Chr (69); $Bold0 = Chr (27). Chr (70); $Initialized = chr (27). chr (64); $Condensed1 = chr (15); $Condensed0 = chr (18); $Data = $ initialized ; $Data . = $ condensed1 ; $Data . = "========================== \ n" ; $Data . = "|" . $bold1 . "OFIDZ MAJEZTY" . $bold0 . "| \ n" ; $Data . = "========================== \ n" ; $Data . = "Ofidz Majezty is here \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "We Love Indonesian PHP \ n" ; $Data . = "-------------------------- \ n" ; fwrite ( $handle , $data ); fclose ( $handle ); copy ( $file , "/ / localhost / xprinter" ); #Perform print unlink ( $file ); ?>
Output for 8.0.13
Parse error: syntax error, unexpected variable "$Tmpdir" in /in/42m1C on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.29, 5.5.0 - 5.5.13, 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected '$Tmpdir' (T_VARIABLE) in /in/42m1C on line 2
Process exited with code 255.

preferences:
145.07 ms | 402 KiB | 266 Q