3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dec = intval((-1 * PHP_INT_MAX) + 1); var_dump(decbin($dec), dec2bin($dec)); function dec2bin($dec) { if ($dec == 0) { return 0; } $sgn = 1; if ($dec < 0) { $sgn = -1; $dec = (PHP_INT_MAX + $dec) + 1; } $bin = ''; while ($dec > 0) { $bin = ($dec & 1) . $bin; $dec >>= 1; } return $sgn > 0 ? $bin : '1' . str_pad($bin, 63, '0', STR_PAD_LEFT); }
Output for git.master, git.master_jit, rfc.property-hooks
string(64) "1000000000000000000000000000000000000000000000000000000000000010" string(64) "1000000000000000000000000000000000000000000000000000000000000010"

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