3v4l.org

run code in 300+ PHP versions simultaneously
<?php class segfault { private static $id = 0; public $name; public function __construct() { self::$id++; $this->name = get_class().'-'.self::$id; } } function string_sfault($s) { echo $s.PHP_EOL; } $stack = array(); for($i=0;$i<101;$i++) { $sf = new segfault(); $stack[] = $sf; string_sfault($sf); } ?>
Output for 8.3.0 - 8.3.6
Deprecated: Calling get_class() without arguments is deprecated in /in/0MJLA on line 9 Fatal error: Uncaught Error: Object of class segfault could not be converted to string in /in/0MJLA:14 Stack trace: #0 /in/0MJLA(21): string_sfault(Object(segfault)) #1 {main} thrown in /in/0MJLA on line 14
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught Error: Object of class segfault could not be converted to string in /in/0MJLA:14 Stack trace: #0 /in/0MJLA(21): string_sfault(Object(segfault)) #1 {main} thrown in /in/0MJLA on line 14
Process exited with code 255.
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Recoverable fatal error: Object of class segfault could not be converted to string in /in/0MJLA on line 14
Process exited with code 255.
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33
Catchable fatal error: Object of class segfault could not be converted to string in /in/0MJLA on line 14
Process exited with code 255.
Output for 5.0.2 - 5.0.5, 5.1.0 - 5.1.6
Object id #1 Object id #2 Object id #3 Object id #4 Object id #5 Object id #6 Object id #7 Object id #8 Object id #9 Object id #10 Object id #11 Object id #12 Object id #13 Object id #14 Object id #15 Object id #16 Object id #17 Object id #18 Object id #19 Object id #20 Object id #21 Object id #22 Object id #23 Object id #24 Object id #25 Object id #26 Object id #27 Object id #28 Object id #29 Object id #30 Object id #31 Object id #32 Object id #33 Object id #34 Object id #35 Object id #36 Object id #37 Object id #38 Object id #39 Object id #40 Object id #41 Object id #42 Object id #43 Object id #44 Object id #45 Object id #46 Object id #47 Object id #48 Object id #49 Object id #50 Object id #51 Object id #52 Object id #53 Object id #54 Object id #55 Object id #56 Object id #57 Object id #58 Object id #59 Object id #60 Object id #61 Object id #62 Object id #63 Object id #64 Object id #65 Object id #66 Object id #67 Object id #68 Object id #69 Object id #70 Object id #71 Object id #72 Object id #73 Object id #74 Object id #75 Object id #76 Object id #77 Object id #78 Object id #79 Object id #80 Object id #81 Object id #82 Object id #83 Object id #84 Object id #85 Object id #86 Object id #87 Object id #88 Object id #89 Object id #90 Object id #91 Object id #92 Object id #93 Object id #94 Object id #95 Object id #96 Object id #97 Object id #98 Object id #99 Object id #100 Object id #101
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #3PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #4PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #5PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #6PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #7PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #8PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #9PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #10PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #11PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #12PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #13PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #14PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #15PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #16PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #17PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #18PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #19PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #20PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #21PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #22PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #23PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #24PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #25PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #26PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #27PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #28PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #29PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #30PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #31PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #32PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #33PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #34PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #35PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #36PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #37PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #38PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #39PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #40PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #41PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #42PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #43PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #44PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #45PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #46PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #47PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #48PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #49PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #50PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #51PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #52PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #53PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #54PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #55PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #56PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #57PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #58PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #59PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #60PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #61PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #62PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #63PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #64PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #65PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #66PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #67PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #68PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #69PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #70PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #71PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #72PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #73PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #74PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #75PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #76PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #77PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #78PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #79PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #80PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #81PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #82PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #83PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #84PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #85PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #86PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #87PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #88PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #89PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #90PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #91PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #92PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #93PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #94PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #95PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #96PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #97PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #98PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #99PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #100PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0MJLA on line 14 Object id #101PHP_EOL
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/0MJLA on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/0MJLA on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/0MJLA on line 4
Process exited with code 255.

preferences:
313.1 ms | 401 KiB | 459 Q