3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $test = "deuxieme"; } $object = new a(); function output($buffer) { global $object; return $buffer." ".$object->test; } ob_start('output'); echo "premier"; $a = range(1,10000); var_dump($a);

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.60.0090.01318.43
8.3.50.0110.00921.98
8.3.40.0140.00319.67
8.3.30.0170.00719.97
8.3.20.0060.00321.20
8.3.10.0000.00922.04
8.3.00.0030.00622.45
8.2.180.0080.01117.75
8.2.170.0160.00722.96
8.2.160.0100.01021.39
8.2.150.0090.00024.18
8.2.140.0090.00024.66
8.2.130.0070.01426.16
8.2.120.0060.00318.75
8.2.110.0000.01121.29
8.2.100.0000.01418.84
8.2.90.0030.00918.75
8.2.80.0000.01019.64
8.2.70.0040.00719.05
8.2.60.0100.00019.03
8.2.50.0030.00818.50
8.2.40.0000.01020.48
8.2.30.0030.00719.19
8.2.20.0030.00718.77
8.2.10.0000.01019.52
8.2.00.0050.00518.86
8.1.280.0210.00325.92
8.1.270.0070.00323.32
8.1.260.0000.00926.35
8.1.250.0000.00928.09
8.1.240.0070.00423.75
8.1.230.0120.00320.35
8.1.220.0000.01219.01
8.1.210.0080.00318.77
8.1.200.0080.00418.73
8.1.190.0040.00718.59
8.1.180.0040.00818.66
8.1.170.0040.00819.84
8.1.160.0000.01023.31
8.1.150.0030.00719.91
8.1.140.0070.00318.84
8.1.130.0090.00019.10
8.1.120.0070.00418.61
8.1.110.0030.00718.75
8.1.100.0030.00618.75
8.1.90.0000.01018.74
8.1.80.0030.00718.74
8.1.70.0060.00318.71
8.1.60.0060.00618.91
8.1.50.0030.00718.69
8.1.40.0050.00518.81
8.1.30.0050.00518.73
8.1.20.0000.01218.88
8.1.10.0070.00418.86
8.1.00.0040.00718.63
8.0.300.0030.00720.85
8.0.290.0070.00417.88
8.0.280.0000.01019.58
8.0.270.0050.00518.31
8.0.260.0060.00618.07
8.0.250.0080.00418.09
8.0.240.0000.00918.10
8.0.230.0000.00918.05
8.0.220.0060.00318.09
8.0.210.0030.00618.02
8.0.200.0050.00518.09
8.0.190.0000.01018.15
8.0.180.0070.00318.02
8.0.170.0070.00318.14
8.0.160.0070.00318.09
8.0.150.0110.00018.08
8.0.140.0030.00717.94
8.0.130.0060.00314.57
8.0.120.0040.00718.08
8.0.110.0030.00718.08
8.0.100.0070.00418.10
8.0.90.0030.00717.89
8.0.80.0070.01318.09
8.0.70.0070.00317.89
8.0.60.0000.01017.98
8.0.50.0070.00318.08
8.0.30.0130.01318.22
8.0.20.0070.01718.12
8.0.10.0000.01018.16
8.0.00.0060.01717.86
7.4.330.0040.00415.10
7.4.320.0060.00317.72
7.4.300.0030.00617.48
7.4.290.0030.00617.57
7.4.280.0030.00617.57
7.4.270.0000.00917.61
7.4.260.0000.01017.56
7.4.250.0000.01017.54
7.4.240.0000.01017.54
7.4.230.0000.01017.47
7.4.220.0160.00617.63
7.4.210.0070.01417.61
7.4.200.0060.00617.61
7.4.190.0000.01017.79
7.4.160.0060.01417.56
7.4.150.0060.01917.59
7.4.140.0060.02017.86
7.4.130.0110.01417.72
7.4.120.0080.01417.61
7.4.110.0130.00917.47
7.4.100.0160.01317.60
7.4.90.0110.01417.46
7.4.80.0120.01519.39
7.4.70.0110.01017.68
7.4.60.0070.01317.70
7.4.50.0030.00917.79
7.4.40.0060.01322.77
7.4.30.0090.01217.65
7.4.00.0120.00915.71
7.3.330.0030.00514.57
7.3.320.0040.00414.42
7.3.310.0070.00317.27
7.3.300.0060.00317.46
7.3.290.0030.01417.43
7.3.280.0080.01317.42
7.3.270.0140.00717.40
7.3.260.0070.02517.40
7.3.250.0100.01217.53
7.3.240.0140.01417.67
7.3.230.0070.01517.51
7.3.210.0120.00917.42
7.3.200.0130.00919.39
7.3.190.0070.02117.57
7.3.180.0140.00617.44
7.3.170.0100.02217.43
7.3.160.0120.00917.36
7.3.120.0040.01416.00
7.2.330.0100.01117.91
7.2.320.0070.01717.94
7.2.310.0110.01117.95
7.2.300.0110.01117.85
7.2.290.0070.01417.66
7.2.80.0070.01016.82
7.2.60.0070.01016.65
7.1.200.0000.01215.89
7.1.70.0000.00917.14
7.1.60.0090.01619.82
7.1.50.0060.01217.20
7.0.200.0030.00916.78

preferences:
69.55 ms | 401 KiB | 5 Q