3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<? 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.4.0 - 5.6.30, 7.0.0 - 7.1.11
Parse error: syntax error, unexpected '$Tmpdir' (T_VARIABLE) in /in/42m1C on line 2
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected T_VARIABLE in /in/42m1C:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected T_VARIABLE in /in/42m1C:2 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: syntax error, unexpected T_VARIABLE in /in/42m1C on line 2
Process exited with code 255.
Output for 4.3.0 - 5.3.29
<? 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 ); ?>