3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Vite { protected $buildDirectory; public function useBuildDirectory($path) { $this->buildDirectory = $path; } public function __invoke($entry, $buildDirectory = 'default') { return func_get_args()[1] ?? $this->buildDirectory ?? 'default'; } } $vite = new Vite(); var_dump([ 'expect' => 'default', 'recieved' => $vite([]) ]); var_dump([ 'expect' => 'foo', 'recieved' => $vite([], 'foo') ]); $vite->useBuildDirectory('custom'); var_dump([ 'expect' => 'custom', 'recieved' => $vite([]) ]); var_dump([ 'expect' => 'foo', 'recieved' => $vite([], 'foo') ]);

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.5.10.0100.00920.21
8.5.00.0130.00820.16
8.4.160.0120.00923.92
8.4.150.0020.00114.05
8.4.140.0130.00717.68
8.4.130.0090.01317.86
8.4.120.0150.00522.48
8.4.110.0140.00818.70
8.4.100.0110.00917.79
8.4.90.0090.00920.59
8.4.80.0050.00318.84
8.4.70.0080.00720.50
8.4.60.0130.00820.51
8.4.50.0110.01120.21
8.4.40.0120.00318.98
8.4.30.0030.01318.54
8.4.20.0000.01517.95
8.4.10.0070.01321.98
8.3.280.0100.01118.38
8.3.270.0120.00816.79
8.3.260.0110.00916.75
8.3.250.0120.00618.86
8.3.240.0130.00616.75
8.3.230.0110.00716.48
8.3.220.0110.00919.01
8.3.210.0120.00716.79
8.3.200.0050.00416.78
8.3.190.0140.00517.09
8.3.180.0070.00119.10
8.3.170.0070.01116.34
8.3.160.0070.01117.23
8.3.150.0150.00416.77
8.3.140.0110.00416.89
8.3.130.0060.00618.46
8.3.120.0060.00320.87
8.3.110.0060.00320.94
8.3.100.0150.00624.06
8.3.90.0110.00026.77
8.3.80.0060.00316.36
8.3.70.0090.00616.75
8.3.60.0030.01718.43
8.3.50.0170.00020.35
8.3.40.0070.01119.59
8.3.30.0110.00318.84
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0080.01116.66
8.2.280.0110.00818.24
8.2.270.0100.00717.45
8.2.260.0180.00016.80
8.2.250.0040.00418.39
8.2.240.0090.00017.42
8.2.230.0000.00922.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0030.00616.50
8.2.190.0070.01416.75
8.2.180.0000.01625.92
8.2.170.0070.01018.99
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00322.11
8.2.100.0000.01217.84
8.2.90.0000.00817.63
8.2.80.0060.00318.87
8.2.70.0050.00317.75
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0040.00419.88
8.2.30.0000.00718.05
8.2.20.0030.00519.22
8.2.10.0070.00018.07
8.2.00.0040.00419.27
8.1.330.0130.00621.97
8.1.320.0140.00516.13
8.1.310.0120.00616.18
8.1.300.0070.00418.68
8.1.290.0060.00318.88
8.1.280.0090.00925.92
8.1.270.0110.00724.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0100.00020.73
8.1.230.0040.00817.82
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0030.00518.10
8.1.170.0080.00018.59
8.1.160.0060.00318.98
8.1.150.0030.00618.67
8.1.140.0000.00717.55
8.1.130.0060.00318.95
8.1.120.0000.00717.54
8.1.110.0080.00017.42
8.1.100.0000.00717.53
8.1.90.0060.01117.45
8.1.80.0180.00017.48
8.1.70.0100.00517.50
8.1.60.0120.00317.47
8.1.50.0100.00617.44
8.1.40.0110.00417.39
8.1.30.0160.00317.69
8.1.20.0130.00417.68
8.1.10.0000.01517.65
8.1.00.0180.00017.45
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00520.14
8.0.270.0040.00417.96
8.0.260.0030.00318.40
8.0.250.0000.00716.91
8.0.240.0070.00016.87
8.0.230.0000.00717.03
8.0.220.0130.00216.88
8.0.210.0160.00016.87
8.0.200.0080.00816.87
8.0.190.0150.00016.97
8.0.180.0150.00016.95
8.0.170.0140.00016.96
8.0.160.0150.00016.85
8.0.150.0060.00916.84
8.0.140.0080.00816.84
8.0.130.0120.00316.98
8.0.120.0110.00516.88
8.0.110.0150.00016.83
8.0.100.0080.00816.82
8.0.90.0120.00416.75
8.0.80.0170.00016.75
8.0.70.0120.00416.80
8.0.60.0110.00316.86
8.0.50.0120.00216.88
8.0.30.0110.00316.88
8.0.20.0090.00416.99
8.0.10.0100.00417.06
7.4.330.0020.00216.67
7.4.320.0030.00316.61
7.4.300.0060.00816.45
7.4.290.0000.01216.45
7.4.280.0040.00416.61
7.4.270.0100.00416.63
7.4.260.0100.00316.65
7.4.250.0130.00016.43
7.4.240.0110.00616.57
7.4.230.0100.00516.60
7.4.220.0110.00416.55
7.4.210.0070.00716.62
7.4.200.0140.00016.54
7.4.190.0050.00916.65
7.4.180.0100.00516.53
7.4.160.0130.00316.41
7.4.150.0150.00016.42
7.4.140.0110.00416.49
7.4.130.0100.00416.41
7.4.120.0100.00316.51
7.4.110.0150.00016.38
7.4.100.0040.00916.57
7.4.90.0070.00716.60
7.4.80.0100.00516.44
7.4.70.0120.00316.45
7.4.60.0110.00316.52
7.4.50.0080.00616.43
7.4.40.0110.00416.44
7.4.30.0060.00616.46
7.4.20.0080.00716.50
7.4.10.0050.00916.45
7.4.00.0100.00516.50

preferences:
32.36 ms | 403 KiB | 5 Q