3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SEGV { private $obj; public function __construct() { } // there should be construct to get SEGV public function segv() { $this->obj->attribute = "TEST"; } public function getObj() { return $this->obj; } } $s = new SEGV; //$s->segv(); // if value of obj is set from the inside of class, it will not get SEGV. $s->getObj()->attribute["TEST"] = "TEST"; // member value is set from the outside of class $s->segv(); // this set function will get SEGV $s->segv(); echo "SUCCESS\

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.300.0170.04812.51
5.4.290.0110.04712.51
5.4.280.0100.04512.41
5.4.270.0110.04212.41
5.4.260.0210.07212.41
5.4.250.0200.04412.41
5.4.240.0140.05212.41
5.4.230.0100.05612.40
5.4.220.0190.07812.40
5.4.210.0080.05412.40
5.4.200.0130.05212.40
5.4.190.0050.06412.40
5.4.180.0120.05612.40
5.4.170.0090.05412.41
5.4.160.0100.06012.40
5.4.150.0120.04912.40
5.4.140.0110.05112.08
5.4.130.0140.04412.07
5.4.120.0100.05012.03
5.4.110.0110.04912.02
5.4.100.0060.05112.02
5.4.90.0110.05012.03
5.4.80.0040.05712.03
5.4.70.0130.04812.02
5.4.60.0080.05012.02
5.4.50.0100.05012.02
5.4.40.0080.05712.01
5.4.30.0090.04812.01
5.4.20.0090.04912.01
5.4.10.0140.04012.01
5.4.00.0060.05611.50
5.3.280.0090.05312.71
5.3.270.0050.05912.72
5.3.260.0170.05112.72
5.3.250.0180.04512.72
5.3.240.0070.05212.72
5.3.230.0080.05212.71
5.3.220.0120.05712.68
5.3.210.0190.05312.68
5.3.200.0180.04812.68
5.3.190.0060.05112.68
5.3.180.0080.04812.68
5.3.170.0130.05112.67
5.3.160.0080.05712.67
5.3.150.0130.05312.68
5.3.140.0110.05212.66
5.3.130.0090.05812.66
5.3.120.0070.06112.66
5.3.110.0070.05312.66
5.3.100.0050.05112.13
5.3.90.0070.05012.11
5.3.80.0060.04812.10
5.3.70.0060.04912.10
5.3.60.0090.04712.08
5.3.50.0080.05612.04
5.3.40.0110.04712.04
5.3.30.0130.04611.98
5.3.20.0060.04611.77
5.3.10.0140.04411.73
5.3.00.0150.09811.72

preferences:
142.84 ms | 1394 KiB | 7 Q