3v4l.org

run code in 300+ PHP versions simultaneously
<?php $trans = [ 'en' => [ 'user_where_are_you_text' => 'Where are You, %s? It is me, %s! I am waiting here for %s hours!', //... ], 'fr' => [ 'user_where_are_you_text' => 'Où es-tu, %s? C\'est moi, %s! J\'attends ici depuis %s heures!' //... ], ]; $name = 'Loz'; $name1 = 'Rasmus'; $time = 3; function __($key, ...$arguments) { global $trans, $lang; return sprintf($trans[$lang][$key], ...$arguments); } // $lang = 'en'; echo __('user_where_are_you_text', $name, $name1, $time).PHP_EOL; // $lang = 'fr'; echo __('user_where_are_you_text', $name, $name1, $time).PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Where are You, Loz? It is me, Rasmus! I am waiting here for 3 hours! Où es-tu, Loz? C'est moi, Rasmus! J'attends ici depuis 3 heures!

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
32.15 ms | 401 KiB | 8 Q