3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function id($x) { return $x; } class A { function foo() { echo 'a'; } } var_dump(PHP_VERSION_ID); if (PHP_VERSION_ID < 50400) { return id(new A())->foo(); } // return (new A())->foo();
Output for 7.1.0
int(70100)
Output for 7.0.14
int(70014)
Output for 7.0.6
int(70006)
Output for 7.0.5
int(70005)
Output for 7.0.4
int(70004)
Output for 7.0.3
int(70003)
Output for 7.0.2
int(70002)
Output for 7.0.1
int(70001)
Output for 7.0.0
int(70000)
Output for 5.6.28
int(50628)
Output for 5.6.21
int(50621)
Output for 5.6.20
int(50620)
Output for 5.6.19
int(50619)
Output for 5.6.18
int(50618)
Output for 5.6.17
int(50617)
Output for 5.6.16
int(50616)
Output for 5.6.15
int(50615)
Output for 5.6.14
int(50614)
Output for 5.6.13
int(50613)
Output for 5.6.12
int(50612)
Output for 5.6.11
int(50611)
Output for 5.6.10
int(50610)
Output for 5.6.9
int(50609)
Output for 5.6.8
int(50608)
Output for 5.5.35
int(50535)
Output for 5.5.34
int(50534)
Output for 5.5.33
int(50533)
Output for 5.5.32
int(50532)
Output for 5.5.31
int(50531)
Output for 5.5.30
int(50530)
Output for 5.5.29
int(50529)
Output for 5.5.28
int(50528)
Output for 5.5.27
int(50527)
Output for 5.5.26
int(50526)
Output for 5.5.25
int(50525)
Output for 5.5.24
int(50524)
Output for 5.4.45
int(50445)
Output for 5.4.44
int(50444)
Output for 5.4.43
int(50443)
Output for 5.4.42
int(50442)
Output for 5.4.41
int(50441)
Output for 5.4.40
int(50440)
Output for 5.4.39
int(50439)
Output for 5.4.38
int(50438)
Output for 5.4.37
int(50437)
Output for 5.4.36
int(50436)
Output for 5.4.35
int(50435)
Output for 5.4.34
int(50434)
Output for 5.4.32
int(50432)
Output for 5.4.31
int(50431)
Output for 5.4.30
int(50430)
Output for 5.4.29
int(50429)
Output for 5.4.28
int(50428)
Output for 5.4.27
int(50427)
Output for 5.4.26
int(50426)
Output for 5.4.25
int(50425)
Output for 5.4.24
int(50424)
Output for 5.4.23
int(50423)
Output for 5.4.22
int(50422)
Output for 5.4.21
int(50421)
Output for 5.4.20
int(50420)
Output for 5.4.19
int(50419)
Output for 5.4.18
int(50418)
Output for 5.4.17
int(50417)
Output for 5.4.16
int(50416)
Output for 5.4.15
int(50415)
Output for 5.4.14
int(50414)
Output for 5.4.13
int(50413)
Output for 5.4.12
int(50412)
Output for 5.4.11
int(50411)
Output for 5.4.10
int(50410)
Output for 5.4.9
int(50409)
Output for 5.4.8
int(50408)
Output for 5.4.7
int(50407)
Output for 5.4.6
int(50406)
Output for 5.4.5
int(50405)
Output for 5.4.4
int(50404)
Output for 5.4.3
int(50403)
Output for 5.4.2
int(50402)
Output for 5.4.1
int(50401)
Output for 5.4.0
int(50400)
Output for 5.3.29
int(50329) a
Output for 5.3.28
int(50328) a
Output for 5.3.27
int(50327) a
Output for 5.3.26
int(50326) a
Output for 5.3.25
int(50325) a
Output for 5.3.24
int(50324) a
Output for 5.3.23
int(50323) a
Output for 5.3.22
int(50322) a
Output for 5.3.21
int(50321) a
Output for 5.3.20
int(50320) a
Output for 5.3.19
int(50319) a
Output for 5.3.18
int(50318) a
Output for 5.3.17
int(50317) a
Output for 5.3.16
int(50316) a
Output for 5.3.15
int(50315) a
Output for 5.3.14
int(50314) a
Output for 5.3.13
int(50313) a
Output for 5.3.12
int(50312) a
Output for 5.3.11
int(50311) a
Output for 5.3.10
int(50310) a
Output for 5.3.9
int(50309) a
Output for 5.3.8
int(50308) a
Output for 5.3.7
int(50307) a
Output for 5.3.6
int(50306) a
Output for 5.3.5
int(50305) a
Output for 5.3.4
int(50304) a
Output for 5.3.3
int(50303) a
Output for 5.3.2
int(50302) a
Output for 5.3.1
int(50301) a
Output for 5.3.0
int(50300) a
Output for 5.2.17
int(50217) a
Output for 5.2.16
int(50216) a
Output for 5.2.15
int(50215) a
Output for 5.2.14
int(50214) a
Output for 5.2.13
int(50213) a
Output for 5.2.12
int(50212) a
Output for 5.2.11
int(50211) a
Output for 5.2.10
int(50210) a
Output for 5.2.9
int(50209) a
Output for 5.2.8
int(50208) a
Output for 5.2.7
int(50207) a
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.2.6
Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/4k7Ri on line 10 string(14) "PHP_VERSION_ID" Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/4k7Ri on line 11 a
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/4k7Ri on line 15
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/4k7Ri on line 12
Process exited with code 255.
Output for 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/4k7Ri on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/4k7Ri on line 12
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/lGKQI on line 12
Process exited with code 255.