3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo { function random_int(int $min, int $max) : int { return 4; } var_dump(random_int(32, 64)); var_dump(\random_int(32, 64)); }
Output for 7.3.1
int(4) int(34)
Output for 7.3.0
int(4) int(58)
Output for 7.2.13
int(4) int(42)
Output for 7.2.1, 7.2.12
int(4) int(33)
Output for 7.0.20, 7.2.11
int(4) int(61)
Output for 7.1.25, 7.2.10
int(4) int(56)
Output for 7.2.9
int(4) int(46)
Output for 7.0.5, 7.2.4, 7.2.8
int(4) int(32)
Output for 7.2.7
int(4) int(44)
Output for 7.2.6
int(4) int(49)
Output for 7.2.3, 7.2.5
int(4) int(63)
Output for 7.1.7, 7.2.2
int(4) int(55)
Output for 7.2.0
int(4) int(45)
Output for 7.1.6
int(4) int(57)
Output for 7.0.8, 7.1.5
int(4) int(35)
Output for 7.0.1, 7.1.0
int(4) int(38)
Output for 7.0.7
int(4) int(52)
Output for 7.0.6
int(4) int(47)
Output for 7.0.2, 7.0.4
int(4) int(41)
Output for 7.0.3
int(4) int(64)
Output for 7.0.0
int(4) int(50)
Output for 5.3.0 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/po925 on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/po925 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/po925 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/po925 on line 2
Process exited with code 255.