3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ao = new ArrayObject; foreach ([1, 2, 3] as $i => $var) { settype($var, 'string'); $ao[$i] = $var; } var_dump($ao);

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.1.130.0000.00717.38
8.1.120.0050.00317.31
8.1.110.0000.00817.39
8.1.100.0000.00817.44
8.1.90.0020.00517.43
8.1.80.0040.00417.29
8.1.70.0030.00317.38
8.1.60.0070.00017.50
8.1.50.0040.00417.36
8.1.40.0070.00017.34
8.1.30.0050.00317.54
8.1.20.0030.00617.43
8.1.10.0040.00417.62
8.1.00.0040.00417.55
8.0.260.0030.00316.77
8.0.250.0000.00716.78
8.0.240.0030.00516.92
8.0.230.0050.00316.82
8.0.220.0000.00716.86
8.0.210.0000.00716.85
8.0.200.0000.00816.90
8.0.190.0070.00016.93
8.0.180.0030.00316.85
8.0.170.0080.00016.76
8.0.160.0000.00816.85
8.0.150.0070.00016.77
8.0.140.0000.00716.80
8.0.130.0070.00313.25
8.0.120.0030.00516.80
8.0.110.0000.00816.89
8.0.100.0020.00516.72
8.0.90.0040.00416.84
8.0.80.0060.01116.77
8.0.70.0040.00416.64
8.0.60.0040.00416.84
8.0.50.0090.00016.86
8.0.30.0100.00716.92
8.0.20.0100.01017.40
8.0.10.0070.00016.99
8.0.00.0170.00016.82
7.4.330.0060.00015.55
7.4.320.0000.00616.35
7.4.300.0000.01116.44
7.4.290.0070.00016.47
7.4.280.0040.00416.40
7.4.270.0030.00316.49
7.4.260.0040.00416.54
7.4.250.0030.00316.43
7.4.240.0030.00316.56
7.4.230.0040.00416.44
7.4.220.0120.00916.47
7.4.210.0070.00716.45
7.4.200.0000.00716.52
7.4.160.0110.00716.45
7.4.150.0080.00917.40
7.4.140.0140.00617.86
7.4.130.0110.00716.51
7.4.120.0050.01416.41
7.4.110.0110.00716.37
7.4.100.0090.00916.43
7.4.90.0040.01316.47
7.4.80.0100.00619.39
7.4.70.0030.01416.42
7.4.60.0060.00916.46
7.4.50.0000.01216.09
7.4.40.0060.01116.08
7.4.30.0110.01116.41
7.4.00.0030.01014.59
7.3.330.0050.00013.18
7.3.320.0000.00613.07
7.3.310.0070.00016.40
7.3.300.0020.00516.22
7.3.290.0070.01216.27
7.3.280.0040.01316.24
7.3.270.0100.00717.40
7.3.260.0100.00816.49
7.3.250.0090.00816.36
7.3.240.0130.00516.59
7.3.230.0100.01316.66
7.3.210.0090.01316.21
7.3.200.0180.00016.28
7.3.190.0070.01316.36
7.3.180.0090.00816.49
7.3.170.0160.00016.24
7.3.160.0000.01716.25
7.3.10.0030.01216.67
7.3.00.0130.00016.64
7.2.330.0110.01116.44
7.2.320.0060.01516.62
7.2.310.0060.01216.55
7.2.300.0200.00316.53
7.2.290.0100.00716.63
7.2.130.0070.00716.90
7.2.120.0040.00716.77
7.2.110.0070.00716.88
7.2.100.0060.00616.95
7.2.90.0100.00316.93
7.2.80.0040.01116.98
7.2.70.0030.01416.72
7.2.60.0090.00616.73
7.2.50.0040.00816.71
7.2.40.0100.00617.07
7.2.30.0110.00716.75
7.2.20.0080.00416.63
7.2.10.0140.00317.01
7.2.00.0050.00618.05
7.1.250.0040.00715.63
7.1.200.0030.00515.82
7.1.100.0080.00417.77
7.1.70.0000.00917.18
7.1.60.0000.01117.27
7.1.50.0100.00016.79
7.1.40.0040.00716.34
7.1.30.0040.00716.64
7.1.20.0030.00816.58
7.1.10.0000.00816.57
7.1.00.0070.00316.63
7.0.200.0030.00316.76
7.0.190.0040.00416.84
7.0.180.0040.00816.32
7.0.170.0040.00416.27
7.0.160.0030.00616.36
7.0.150.0040.00416.25
7.0.140.0040.00416.63
7.0.130.0060.00316.63
7.0.120.0130.00316.49
7.0.110.0040.00816.28
7.0.100.0110.00416.66
7.0.90.0030.00616.49
7.0.80.0040.00416.52
7.0.70.0040.00416.49
7.0.60.0030.00516.19
7.0.50.0040.00716.48
7.0.40.0000.00716.01
7.0.30.0000.00716.01
7.0.20.0000.01116.01
7.0.10.0030.01016.01
7.0.00.0000.01016.01
5.6.300.0030.04020.81
5.6.290.0000.05920.91
5.6.280.0340.04420.87
5.6.270.0030.04820.87
5.6.260.0100.03720.87
5.6.250.0000.07220.88
5.6.240.0070.04120.96
5.6.230.0070.04320.96
5.6.220.0000.04820.86
5.6.210.0160.04320.64
5.6.200.0100.03920.83
5.6.190.0090.03520.83
5.6.180.0030.04620.83
5.6.170.0060.03920.93
5.6.160.0030.09120.93
5.6.150.0000.05920.93
5.6.140.0100.04420.82
5.6.130.0200.04620.78
5.6.120.0030.05420.92
5.6.110.0070.06020.98
5.6.100.0000.05621.02
5.6.90.0000.05620.72
5.6.80.0070.03920.34
5.6.70.0030.03820.33
5.6.60.0130.03620.28
5.6.50.0100.03020.12
5.6.40.0030.03920.16
5.6.30.0030.04820.25
5.6.20.0100.03620.20
5.6.10.0130.04320.39
5.6.00.0000.08420.21
5.5.380.0030.04617.46
5.5.370.0000.05717.47
5.5.360.0000.05817.46
5.5.350.0030.03817.53
5.5.340.0030.04818.04
5.5.330.0060.05518.00
5.5.320.0130.06317.74
5.5.310.0030.03917.98
5.5.300.0100.05017.94
5.5.290.0260.03018.07
5.5.280.0000.04418.02
5.5.270.0070.05218.02
5.5.260.0030.05717.85
5.5.250.0030.04717.50
5.5.240.0030.03917.13
5.5.230.0030.04817.39
5.5.220.0000.04217.43
5.5.210.0000.04117.41
5.5.200.0030.04317.41
5.5.190.0000.04117.29
5.5.180.0100.05417.37
5.5.160.0060.05517.31
5.5.150.0070.08117.38
5.5.140.0000.04417.37
5.5.130.0030.04217.23
5.5.120.0000.04817.41
5.5.110.0060.03617.08
5.5.100.0030.04217.23
5.5.90.0030.04117.30
5.5.80.0000.04617.18
5.5.70.0000.04017.21
5.5.60.0030.04017.30
5.5.50.0070.03317.31
5.5.40.0030.03917.10
5.5.30.0030.03817.07
5.5.20.0060.03617.20
5.5.10.0070.04017.23
5.5.00.0030.03717.20
5.4.450.0040.05319.52
5.4.440.0100.05919.16
5.4.430.0030.07119.18
5.4.420.0030.03919.39
5.4.410.0030.04619.34
5.4.400.0000.05319.14
5.4.390.0030.07918.94
5.4.380.0030.04319.07
5.4.370.0040.03619.03
5.4.360.0040.03919.17
5.4.350.0070.04319.06
5.4.340.0030.03619.07
5.4.320.0030.03818.88
5.4.310.0000.05619.10
5.4.300.0000.04318.98
5.4.290.0030.04319.16
5.4.280.0030.04219.02
5.4.270.0030.03919.01
5.4.260.0030.04219.06
5.4.250.0070.03818.85
5.4.240.0200.03319.19
5.4.230.0000.04318.91
5.4.220.0070.03418.98
5.4.210.0030.03919.17
5.4.200.0070.04018.97
5.4.190.0060.03819.06
5.4.180.0000.04419.08
5.4.170.0100.03319.09
5.4.160.0000.03918.98
5.4.150.0000.04319.00
5.4.140.0030.03716.47
5.4.130.0100.03216.34
5.4.120.0000.04016.70
5.4.110.0000.03816.36
5.4.100.0170.04416.35
5.4.90.0070.03316.42
5.4.80.0200.03016.49
5.4.70.0000.04816.62
5.4.60.0000.03616.33
5.4.50.0060.03916.45
5.4.40.0030.03916.66
5.4.30.0030.03416.46
5.4.20.0030.03616.39
5.4.10.0000.04316.47
5.4.00.0060.03116.01
5.3.290.0000.06516.01
5.3.280.0030.04216.01
5.3.270.0030.04216.01
5.3.260.0000.06416.01
5.3.250.0000.04216.01
5.3.240.0030.03616.01
5.3.230.0000.04116.01
5.3.220.0030.03716.01
5.3.210.0000.04316.01
5.3.200.0000.04216.01
5.3.190.0030.03716.01
5.3.180.0030.03816.01
5.3.170.0000.04316.01
5.3.160.0030.03716.01
5.3.150.0030.03716.01
5.3.140.0000.04316.01
5.3.130.0030.04016.01
5.3.120.0030.04116.01
5.3.110.0000.04216.01
5.3.100.0070.03616.01
5.3.90.0000.03716.01
5.3.80.0030.03716.01
5.3.70.0070.03016.01
5.3.60.0000.03616.01
5.3.50.0000.03616.01
5.3.40.0030.04116.01
5.3.30.0000.04116.01
5.3.20.0000.03916.01
5.3.10.0070.03616.01
5.3.00.0000.03616.01
5.2.170.0070.06316.01
5.2.160.0000.04016.01
5.2.150.0030.03516.01
5.2.140.0000.03316.01
5.2.130.0140.03116.01
5.2.120.0030.02816.01
5.2.110.0030.05816.01
5.2.100.0000.03816.01
5.2.90.0000.02916.01
5.2.80.0060.03516.01
5.2.70.0070.02716.01
5.2.60.0070.02416.01
5.2.50.0000.03316.01
5.2.40.0030.02816.01
5.2.30.0060.03516.01
5.2.20.0000.03516.01
5.2.10.0000.03716.01
5.2.00.0240.03116.01
5.1.60.0000.02616.01
5.1.50.0000.02716.01
5.1.40.0000.02616.01
5.1.30.0100.02716.01
5.1.20.0000.03116.01
5.1.10.0030.02716.01
5.1.00.0000.02716.01
5.0.50.0000.02416.01
5.0.40.0000.02316.01
5.0.30.0030.02816.01
5.0.20.0060.01416.01
5.0.10.0000.02216.01
5.0.00.0000.03216.01
4.4.90.0000.01616.01
4.4.80.0030.01316.01
4.4.70.0060.01016.01
4.4.60.0040.01416.01
4.4.50.0000.01916.01
4.4.40.0000.02716.01
4.4.30.0060.01016.01
4.4.20.0030.01416.01
4.4.10.0000.01616.01
4.4.00.0000.02616.01
4.3.110.0030.01416.01
4.3.100.0030.01616.01
4.3.90.0030.01316.01
4.3.80.0030.02316.01
4.3.70.0030.01316.01
4.3.60.0000.01816.01
4.3.50.0000.01916.01
4.3.40.0070.02816.01
4.3.30.0040.02516.01
4.3.20.0040.01416.01
4.3.10.0070.01016.01
4.3.00.0030.01316.01

preferences:
13.99 ms | 406 KiB | 5 Q