3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public string $default = 'default'; } class B { public function __construct(public string $default = 'default') {} } $a = new A(); echo "Original A: {$a->default}\n"; $b = new B(); echo "Original B: {$b->default}\n"; $a = (new ReflectionClass($a))->newInstanceWithoutConstructor(); echo "New A: {$a->default}\n"; $b = (new ReflectionClass($b))->newInstanceWithoutConstructor(); echo "New B: {$b->default}\n";

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.4.120.0090.01022.35
8.4.110.0110.00824.09
8.4.100.0120.00818.76
8.4.90.0150.00520.93
8.4.80.0120.00918.64
8.4.70.0110.00818.83
8.4.60.0130.00818.77
8.4.50.0060.01418.81
8.4.40.0030.01617.83
8.4.30.0060.00922.21
8.4.20.0090.00018.73
8.4.10.0120.00019.64
8.3.250.0110.00818.83
8.3.240.0110.00816.97
8.3.230.0100.00516.86
8.3.220.0050.00218.93
8.3.210.0100.01116.53
8.3.200.0060.00316.65
8.3.190.0130.00517.12
8.3.180.0110.00418.68
8.3.170.0160.00016.84
8.3.160.0070.01117.20
8.3.150.0070.01116.66
8.3.140.0070.01120.78
8.3.130.0040.00418.60
8.3.120.0060.00320.69
8.3.110.0130.00620.94
8.3.100.0000.01116.88
8.3.90.0070.00726.77
8.3.80.0090.00018.43
8.3.70.0150.00018.55
8.3.60.0040.01116.75
8.3.50.0040.01216.93
8.3.40.0120.00320.26
8.3.30.0100.00321.89
8.3.20.0040.00424.18
8.3.10.0050.00224.66
8.3.00.0040.00426.16
8.2.290.0100.00820.72
8.2.280.0030.00518.82
8.2.270.0110.00716.78
8.2.260.0110.00716.85
8.2.250.0050.00316.86
8.2.240.0060.00919.08
8.2.230.0060.00322.58
8.2.220.0030.01624.06
8.2.210.0130.00626.77
8.2.200.0060.00316.75
8.2.190.0090.00618.41
8.2.180.0120.00918.41
8.2.170.0120.00318.94
8.2.160.0080.00822.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.87
8.2.110.0150.00620.21
8.2.100.0200.00719.18
8.2.90.0310.00318.90
8.2.80.0170.00318.84
8.2.70.0280.01018.74
8.2.60.0340.00318.75
8.2.50.0300.01018.94
8.2.40.0180.01118.86
8.2.30.0180.00418.66
8.2.20.0140.00318.82
8.2.10.0220.00619.07
8.2.00.0240.00718.95
8.1.330.0110.00822.02
8.1.320.0070.01218.00
8.1.310.0150.00416.35
8.1.300.0060.00920.19
8.1.290.0130.00030.84
8.1.280.0070.00725.92
8.1.270.0100.00023.90
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0260.00318.27
8.1.230.0190.00818.63
8.1.220.0040.01218.57
8.1.210.0180.01119.80
8.1.200.0190.01318.31
8.1.190.0200.01018.34
8.1.180.0270.00318.39
8.1.170.0170.00718.38
8.1.160.0120.00818.73
8.1.150.0220.00620.57
8.1.140.0210.00318.55
8.1.130.0090.00618.34
8.1.120.0230.01218.55
8.1.110.0190.00618.51
8.1.100.0340.00718.46
8.1.90.0090.00618.55
8.1.80.0120.00618.63
8.1.70.0240.01018.70
8.1.60.0350.00618.77
8.1.50.0340.00318.67
8.1.40.0390.00018.59
8.1.30.0230.00318.94
8.1.20.0300.01018.75
8.1.10.0220.00018.65
8.1.00.0040.01418.64
8.0.300.0180.00017.86
8.0.290.0200.00017.91
8.0.280.0250.00017.81
8.0.270.0130.00317.79
8.0.260.0150.00317.81
8.0.250.0140.00318.01
8.0.240.0140.02217.76
8.0.230.0230.00018.18
8.0.220.0210.01018.00
8.0.210.0220.01517.93
8.0.200.0210.01417.69
8.0.190.0270.01017.90
8.0.180.0300.00418.04
8.0.170.0190.01317.58
8.0.160.0230.00317.94
8.0.150.0280.00317.62
8.0.140.0240.00017.79
8.0.130.0230.01618.27
8.0.120.0280.01217.73
8.0.110.0230.01017.82
8.0.100.0270.00417.94
8.0.90.0240.00717.88
8.0.80.0270.00917.94
8.0.70.0240.00717.88
8.0.60.0200.01317.72
8.0.50.0350.00317.80
8.0.30.0180.00917.93
8.0.20.0290.01318.00
8.0.10.0260.00617.98

preferences:
31.22 ms | 403 KiB | 5 Q