3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test() { static $v = []; $v[] = 'x'; } } $r = new \ReflectionMethod(A::class, 'test'); print_r($r->getStaticVariables()); $a = new A(); $a->test(); print_r($r->getStaticVariables()); $a->test(); print_r($r->getStaticVariables()); $r->getStaticVariables()['v'][0] = ['replace_first_x']; print_r($r->getStaticVariables()); $a->test(); print_r($r->getStaticVariables());

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.130.0050.00417.89
8.4.120.0110.00820.54
8.4.110.0100.00922.60
8.4.100.0140.00617.64
8.4.90.0100.01020.43
8.4.80.0120.00819.00
8.4.70.0100.00920.54
8.4.60.0160.00718.82
8.4.50.0110.00924.26
8.4.40.0070.00318.80
8.4.30.0060.00320.59
8.4.20.0030.01317.94
8.4.10.0100.00022.11
8.3.260.0110.00816.93
8.3.250.0110.00718.80
8.3.240.0130.00616.59
8.3.230.0100.01016.75
8.3.220.0070.00818.74
8.3.210.0110.00718.49
8.3.200.0050.00416.92
8.3.190.0030.00517.24
8.3.180.0120.00718.99
8.3.170.0120.00619.09
8.3.160.0040.01417.32
8.3.150.0150.00417.16
8.3.140.0040.01118.91
8.3.130.0060.00318.52
8.3.120.0060.00318.79
8.3.110.0050.00320.94
8.3.100.0070.00318.48
8.3.90.0040.00426.77
8.3.80.0090.00318.52
8.3.70.0040.01116.58
8.3.60.0060.01018.43
8.3.50.0140.00720.11
8.3.40.0070.00722.04
8.3.30.0100.00618.58
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0110.00916.61
8.2.280.0160.00418.21
8.2.270.0030.00516.61
8.2.260.0120.00616.77
8.2.250.0000.00816.71
8.2.240.0080.00017.28
8.2.230.0150.00022.58
8.2.220.0150.00424.06
8.2.210.0140.00026.77
8.2.200.0060.00316.75
8.2.190.0120.00316.63
8.2.180.0060.01325.92
8.2.170.0120.00318.81
8.2.160.0090.00622.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0030.00720.40
8.2.100.0070.00418.03
8.2.90.0080.00017.75
8.2.80.0080.00018.80
8.2.70.0050.00317.63
8.2.60.0040.00417.48
8.2.50.0050.00318.04
8.2.40.0040.00418.34
8.2.30.0000.00718.12
8.2.20.0080.00020.30
8.2.10.0040.00417.98
8.2.00.0000.00719.21
8.1.330.0060.00616.28
8.1.320.0080.01018.03
8.1.310.0030.01020.12
8.1.300.0150.00417.61
8.1.290.0000.01130.84
8.1.280.0120.00325.92
8.1.270.0090.00023.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0110.00023.78
8.1.230.0030.00920.85
8.1.220.0030.00618.69
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0000.00817.62
8.1.160.0050.00218.81
8.1.150.0040.00418.63
8.1.140.0060.00317.42
8.1.130.0000.00818.94
8.1.120.0030.00517.50
8.1.110.0000.01017.45
8.1.100.0000.00717.33
8.1.90.0040.00417.25
8.1.80.0110.00517.27
8.1.70.0160.00017.38
8.1.60.0130.00617.51
8.1.50.0180.00017.37
8.1.40.0130.00417.53
8.1.30.0180.00017.63
8.1.20.0060.01117.61
8.1.10.0180.00017.53
8.1.00.0130.00417.43
8.0.300.0030.00618.77
8.0.290.0000.00716.75
8.0.280.0000.00718.44
8.0.270.0050.00216.88
8.0.260.0030.00318.36
8.0.250.0030.00516.86
8.0.240.0060.00316.96
8.0.230.0030.00616.95
8.0.220.0030.00316.81
8.0.210.0090.00516.88
8.0.200.0080.00716.79
8.0.190.0050.01016.78
8.0.180.0140.00316.82
8.0.170.0050.01116.85
8.0.160.0070.00516.82
8.0.150.0090.00616.70
8.0.140.0160.00016.84
8.0.130.0110.00616.82
8.0.120.0120.00316.81
8.0.110.0150.00016.80
8.0.100.0000.01216.78
8.0.90.0110.00016.55
8.0.80.0080.00316.77
8.0.70.0000.01116.54
8.0.60.0030.00616.76
8.0.50.0020.00816.88
8.0.30.0050.00516.67
8.0.20.0020.00716.80
8.0.10.0030.00616.93
7.4.330.0000.00515.55
7.4.320.0050.00216.57
7.4.300.0000.01015.82
7.4.290.0070.00416.41
7.4.280.0000.01016.49
7.4.270.0000.01316.39
7.4.260.0130.00416.46
7.4.250.0120.00216.47
7.4.240.0050.00616.52
7.4.230.0050.00816.45
7.4.220.0110.00416.48
7.4.210.0090.00516.55
7.4.200.0120.00216.18
7.4.190.0100.00316.55
7.4.180.0110.00016.46
7.4.160.0080.00316.55
7.4.150.0070.00416.36
7.4.140.0070.00416.36
7.4.130.0080.00416.32
7.4.120.0060.00416.36
7.4.110.0110.00016.43
7.4.100.0060.00616.53
7.4.90.0130.00016.29
7.4.80.0100.00516.38
7.4.70.0100.00516.45
7.4.60.0040.00816.41
7.4.50.0120.00016.15
7.4.40.0050.00516.27
7.4.30.0050.00516.33
7.4.20.0060.00316.29
7.4.10.0090.00016.52
7.4.00.0060.00416.36

preferences:
34.96 ms | 403 KiB | 5 Q