3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data[] = 0; $data[] = 0.0; $data[] = '0'; $data[] = NULL; $data[] = false; $data[] = true; $data[] = 1; $data[] = 1.1; $data[] = 0.1; $data[] = 'STARTED'; foreach ($data as $value) { if (empty($value) && (string)$value !== '0') { echo var_dump($value) . " is empty\r\n"; } else { echo var_dump($value) . " is not empty\r\n"; } }
Output for git.master, git.master_jit, rfc.property-hooks
int(0) is not empty float(0) is not empty string(1) "0" is not empty NULL is empty bool(false) is empty bool(true) is not empty int(1) is not empty float(1.1) is not empty float(0.1) is not empty string(7) "STARTED" is not empty

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