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 5.3.0 - 5.3.29, 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 token "$" in /in/2UAOr on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.29, 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected '$' in /in/2UAOr on line 2
Process exited with code 255.

preferences:
178.41 ms | 402 KiB | 200 Q