3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mypi = 3.1415926535897932384626433832795028841971; $mypi = 3.141592653589793; $pi = pi(); printf("pi: %.24f, %.24f, %.24f\n", $pi, $mypi, M_PI); $l = strlen($mypi); echo "l: $l\n"; $d = pack("d", $mypi); $l = strlen($d); echo "l: $l\n"; $un = unpack("d", $d); $d = end($un); printf("%.24g\n", $d); $pi = 3.1415926535897932384626433832795028841971; $s = preg_split("//", $pi); $c = count($s); print_r($s); echo "c: $c\n";
Output for git.master, git.master_jit, rfc.property-hooks
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 3.14159265358979311599796 Array ( [0] => [1] => 3 [2] => . [3] => 1 [4] => 4 [5] => 1 [6] => 5 [7] => 9 [8] => 2 [9] => 6 [10] => 5 [11] => 3 [12] => 5 [13] => 8 [14] => 9 [15] => 8 [16] => ) c: 17

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:
44.81 ms | 402 KiB | 8 Q