3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container { public function getObject() { $this->object = new StringableObject(); return $this->object; } // This destructor is required to exist to trigger the segfault public function __destruct() { } } class StringableObject { public function __toString() { $this->test = $this; return 'test123'; } } $container = new Container(); $object = $container->getObject(); // Any kind of function which triggers a 'to string' object conversion // Casting $object with (string) will circumvent the problem echo trim($object); // Another call is required to corrupt heap echo trim('test');

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)
8.3.70.0140.00418.56
8.3.60.0100.01018.39
8.3.50.0100.00822.05
8.3.40.0140.00318.87
8.3.30.0140.00718.79
8.3.20.0000.00818.73
8.3.10.0030.00620.89
8.3.00.0000.00721.73
8.2.180.0060.01216.63
8.2.170.0150.00022.96
8.2.160.0030.01020.40
8.2.150.0060.00324.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0070.00720.97
8.2.110.0090.00022.16
8.2.100.0040.00817.91
8.2.90.0040.00417.75
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0060.00318.04
8.2.50.0080.00018.10
8.2.40.0000.00822.33
8.2.30.0050.00319.45
8.2.20.0050.00317.72
8.2.10.0070.00017.79
8.2.00.0040.00417.67
8.1.280.0090.00925.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00520.77
8.1.230.0100.00019.01
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00617.25
8.1.190.0070.00317.22
8.1.180.0060.00318.10
8.1.170.0050.00318.37
8.1.160.0040.00418.89
8.1.150.0030.00518.58
8.1.140.0040.00417.46
8.1.130.0030.00317.89
8.1.120.0000.00717.48
8.1.110.0070.00017.46
8.1.100.0040.00417.46
8.1.90.0070.00017.50
8.1.80.0030.00317.50
8.1.70.0030.00317.42
8.1.60.0000.00917.61
8.1.50.0000.00717.36
8.1.40.0050.00317.55
8.1.30.0000.00817.68
8.1.20.0040.00417.54
8.1.10.0000.00817.46
8.1.00.0090.00017.39
8.0.300.0000.00719.67
8.0.290.0000.00816.63
8.0.280.0080.00018.48
8.0.270.0000.00717.13
8.0.260.0030.00316.81
8.0.250.0000.00816.95
8.0.240.0050.00316.98
8.0.230.0000.00716.84
8.0.220.0000.00716.80
8.0.210.0070.00016.77
8.0.200.0000.00716.94
8.0.190.0030.00316.98
8.0.180.0040.00416.80
8.0.170.0040.00416.98
8.0.160.0030.00316.79
8.0.150.0040.00416.93
8.0.140.0020.00516.75
8.0.130.0030.00313.30
8.0.120.0040.00416.95
8.0.110.0040.00416.96
8.0.100.0030.00516.88
8.0.90.0000.00716.70
8.0.80.0060.01516.89
8.0.70.0070.00016.89
8.0.60.0040.00416.79
8.0.50.0050.00216.76
8.0.30.0120.00616.82
8.0.20.0100.00817.41
8.0.10.0040.00316.82
8.0.00.0110.00616.73
7.4.330.0000.00516.84
7.4.320.0030.00316.47
7.4.300.0000.00616.53
7.4.290.0000.00716.43
7.4.280.0030.00316.59
7.4.270.0050.00216.61
7.4.260.0000.00513.30
7.4.250.0040.00416.56
7.4.240.0000.00716.40
7.4.230.0070.00016.71
7.4.220.0090.00616.58
7.4.210.0080.00816.52
7.4.200.0050.00216.60
7.4.190.0030.00316.69
7.4.160.0070.00716.51
7.4.150.0120.00617.40
7.4.140.0050.01217.86
7.4.130.0110.01016.51
7.4.120.0090.00916.53
7.4.110.0100.00716.41
7.4.100.0100.00716.60
7.4.90.0090.00916.30
7.4.80.0120.00419.39
7.4.70.0170.00716.59
7.4.60.0090.00916.55
7.4.50.0060.00316.57
7.4.40.0000.01222.77
7.4.30.0100.00616.50
7.4.00.0060.00914.62
7.3.330.0060.00013.28
7.3.320.0000.00613.26
7.3.310.0040.00416.33
7.3.300.0060.00016.18
7.3.290.0070.00716.33
7.3.280.0110.00616.29
7.3.270.0100.00717.40
7.3.260.0100.01318.24
7.3.250.0120.00716.58
7.3.240.0030.01316.30
7.3.230.0110.00716.59
7.3.210.0100.00716.30
7.3.200.0130.01019.39
7.3.190.0100.00616.55
7.3.180.0090.00616.25
7.3.170.0050.01016.34
7.3.160.0140.00716.28
7.3.120.0070.01014.58
7.3.10.0000.01616.43
7.3.00.0000.01116.57
7.2.330.0060.01216.60
7.2.320.0070.01516.79
7.2.310.0170.00716.76
7.2.300.0100.00616.38
7.2.290.0030.01516.29
7.2.130.0060.00916.68
7.2.120.0030.01417.00
7.2.110.0040.00716.86
7.2.100.0030.01216.85
7.2.90.0080.00816.68
7.2.80.0030.00716.70
7.2.70.0080.00816.35
7.2.60.0000.01616.80
7.2.50.0030.00916.73
7.2.40.0090.00316.59
7.2.30.0060.00616.91
7.2.20.0070.00716.91
7.2.10.0030.01516.57
7.2.00.0030.01118.00
7.1.250.0040.01115.71
7.1.100.0310.01317.38
7.1.70.0070.00317.11
7.1.60.0110.01419.40
7.1.50.0030.02116.88
7.1.00.0030.03322.35
7.0.200.0030.00316.79
7.0.140.0070.07022.00
7.0.60.0000.03321.59
7.0.50.0070.04717.97
7.0.40.0100.03719.96
7.0.30.0300.04720.06
7.0.20.0330.06720.16
7.0.10.0030.06020.21
7.0.00.0070.07720.05
5.6.280.0000.07721.12
5.6.210.0100.07720.46
5.6.200.0100.05318.20
5.6.190.0100.07020.39
5.6.180.0170.04320.63
5.6.170.0270.08020.54
5.6.160.0070.08020.58
5.6.150.0000.05718.30
5.6.140.0030.08718.18
5.6.130.0130.06018.15
5.6.120.0070.04021.00
5.6.110.0130.07321.15
5.6.100.0070.08021.01
5.6.90.0070.08021.04
5.6.80.0000.04320.40
5.5.350.0130.04020.53
5.5.340.0070.08318.01
5.5.330.0030.04320.40
5.5.320.0530.07320.30
5.5.310.0230.07320.34
5.5.300.0030.06717.97
5.5.290.0130.03317.98
5.5.280.0170.07720.73
5.5.270.0070.05720.87
5.5.260.0130.08020.84
5.5.250.0070.06320.70
5.5.240.0030.06020.07
5.4.450.4400.04719.39
5.4.440.3530.03319.53
5.4.430.4570.03319.30
5.4.420.4470.03719.30
5.4.410.4300.04019.27
5.4.400.4500.03318.93
5.4.390.4030.04319.27
5.4.380.3800.03719.26
5.4.370.3900.03318.98
5.4.360.3900.04319.16
5.4.350.3600.04019.26
5.4.340.3670.03319.23
5.4.320.3630.03319.06
5.4.310.3230.04019.26
5.4.300.3470.03319.16
5.4.290.4070.03719.17
5.4.280.4500.02319.22
5.4.270.3870.03718.93
5.4.260.4630.04019.22
5.4.250.3930.03719.26
5.4.240.3830.03719.14
5.4.230.3930.04018.99
5.4.220.4600.03718.98
5.4.210.4600.03718.98
5.4.200.4530.03718.92
5.4.190.4800.04319.11
5.4.180.4270.04019.21
5.4.170.4000.04319.25
5.4.160.4830.04719.20
5.4.150.4430.04018.96
5.4.140.4530.03716.30
5.4.130.3430.03316.43
5.4.120.0130.06316.59
5.4.110.4570.04316.60
5.4.100.3630.04016.31
5.4.90.3570.03316.54
5.4.80.3830.04316.47
5.4.70.4070.03716.54
5.4.60.3900.04016.46
5.4.50.3630.04016.53
5.4.40.4630.03316.30
5.4.30.4570.03316.22
5.4.20.0500.04316.19
5.4.10.0000.04016.46
5.4.00.0100.04715.79
5.3.290.3670.03314.72
5.3.280.4000.03714.62
5.3.270.3700.04014.64
5.3.260.3570.03014.61
5.3.250.4200.04314.67
5.3.240.4200.03314.50
5.3.230.0130.04014.76
5.3.220.0130.06014.62
5.3.210.3170.05314.72
5.3.200.3800.04014.49
5.3.190.3330.03714.46
5.3.180.4900.03714.56
5.3.170.3700.03314.61
5.3.160.3800.03714.66
5.3.150.3930.03314.48
5.3.140.4000.03314.71
5.3.130.4570.03714.55
5.3.120.3930.02714.54
5.3.110.0070.05714.61
5.3.100.4530.03713.97
5.3.90.4230.03313.88
5.3.80.3670.04013.80
5.3.70.4300.04013.80
5.3.60.4330.04013.81
5.3.50.4530.04013.72
5.3.40.4270.03013.73
5.3.30.3630.03313.72
5.3.20.3730.03013.50
5.3.10.4200.02313.45
5.3.00.4170.03713.45
5.2.170.3900.02011.11
5.2.160.3570.02311.15
5.2.150.2900.03311.19
5.2.140.3170.02311.30
5.2.130.3000.03011.16
5.2.120.3770.02011.14
5.2.110.3930.02311.14
5.2.100.3500.02711.06
5.2.90.3800.02311.27
5.2.80.3930.03011.02
5.2.70.3930.02311.26
5.2.60.3670.03311.13
5.2.50.3330.02711.19
5.2.40.2400.02710.91
5.2.30.2730.03011.00
5.2.20.2670.03311.03
5.2.10.2670.02710.82
5.2.00.2430.02310.73
5.1.60.3300.02710.03
5.1.50.2800.02310.06
5.1.40.2800.0279.98
5.1.30.2830.03010.34
5.1.20.2700.02010.39
5.1.10.2470.02710.10
5.1.00.2300.03010.03
5.0.50.1570.0238.71
5.0.40.1430.0238.46
5.0.30.1400.0338.30
5.0.20.1400.0238.20
5.0.10.1530.0208.15
5.0.00.1700.0378.19
4.4.90.1770.0175.82
4.4.80.1400.0175.85
4.4.70.1430.0205.82
4.4.60.1300.0205.82
4.4.50.1430.0205.93
4.4.40.1600.0275.82
4.4.30.1400.0205.92
4.4.20.1630.0105.88
4.4.10.1430.0205.89
4.4.00.1470.0275.91
4.3.110.1430.0135.82
4.3.100.1530.0135.82
4.3.90.1730.0135.82
4.3.80.1770.0235.82
4.3.70.1730.0175.82
4.3.60.1600.0175.82
4.3.50.1800.0135.82
4.3.40.1430.0235.82
4.3.30.1000.0205.82
4.3.20.0830.0135.82
4.3.10.0970.0205.82
4.3.00.1000.0235.82

preferences:
40.82 ms | 401 KiB | 5 Q