3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = NAN; var_dump(++$f); // float NAN var_dump((float) NAN); // float NAN var_dump((int) NAN); // int -2147483648 -> what? var_dump((bool) NAN); // bool true -> makes sense $f = INF; var_dump(++$f); // float INF var_dump((float) INF); // float INF var_dump((int) INF); // int 0 -> what? var_dump((bool) INF); // bool true -> so why int 0? var_dump((int) (bool) INF); // int 1
Output for git.master, git.master_jit, rfc.property-hooks
float(NAN) float(NAN) int(0) bool(true) float(INF) float(INF) int(0) bool(true) int(1)

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.71 ms | 401 KiB | 8 Q