3v4l.org

run code in 150+ 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.34 - 5.4.37
Parse error: syntax error, unexpected '$Tmpdir' (T_VARIABLE) in /in/42m1C on line 2
Process exited with code 255.
Output for 5.3.0 - 5.4.32
<? 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 ); ?>