3v4l.org

run code in 300+ PHP versions simultaneously
<?php test('pie', function($a){return $a;}); test('pie', function($a){return $a == 15;}); test('pie', function($a){return $a === 15;}); test('pie', function($a){return (int)$a;}); function test($label, $lambda){ static $a = ['hex' => '0xf', 'str' => '15', 'int' => 15]; echo $label; foreach($a AS $k=>$v) { echo " $k => "; var_export($lambda($v)); } echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
pie hex => '0xf' str => '15' int => 15 pie hex => false str => true int => true pie hex => false str => false int => true pie hex => 0 str => 15 int => 15

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:
37.56 ms | 401 KiB | 8 Q