3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $order = "Pedido: [PEDIDO]\nNome: [NOME]\nValor: [VALOR]\nFrete: [FRETE]\n Desconto: [DESCONTO]\nTotal: [TOTAL]"; $replacements = array( '[PEDIDO]' => 123, '[NOME]' => 'Bruno Augusto', '[VALOR]' => 69.00, '[FRETE]' => 0, '[DESCONTO]' => 69.00, '[TOTAL]' => 'It\'s FREE!', ); var_dump( array_map( 'preg_quote', array_keys( $replacements ), array( '/' ) ); //echo preg_replace( array_map( 'preg_quote', array_keys( $replacements ), array( '/' ) ), array_map( 'preg_quote', array_values( $replacements ) ), $order );
based on pu5jB
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.31
Parse error: syntax error, unexpected ';' in /in/etgp9 on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ';' in /in/etgp9 on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/etgp9 on line 14
Process exited with code 255.