3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a' => 1, 'b' => 2, 'c' => 3]; $b = new stdClass(); $b->a = 1; $b->b = 2; $b->c = 3; echo microtime(true), PHP_EOL; for ($i = 0; $i < 100000; $i++) { $a['a']; } echo microtime(true), PHP_EOL; for ($i = 0; $i < 100000; $i++) { $b->a; } echo microtime(true), PHP_EOL;

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)
7.3.120.0100.01014.85
7.3.110.0040.01814.92
7.3.100.0100.01314.54
7.3.90.0100.01014.47
7.3.80.0060.01015.04
7.3.70.0030.01214.88
7.3.60.0000.02014.52
7.3.50.0060.01314.73
7.3.40.0100.01314.80
7.3.30.0060.01614.60
7.3.20.0060.01016.82
7.3.10.0020.01516.51
7.3.00.0120.00716.50
7.2.240.0030.02015.05
7.2.230.0000.01615.33
7.2.220.0090.01215.24
7.2.210.0060.01615.20
7.2.200.0100.01015.10
7.2.190.0030.01714.90
7.2.180.0000.02115.14
7.2.170.0000.01915.12
7.2.160.0070.01015.20
7.2.150.0040.01516.85
7.2.140.0150.00916.85
7.2.130.0100.01816.86
7.2.120.0070.01816.87
7.2.110.0210.01216.67
7.2.100.0070.01716.92
7.2.90.0690.01216.01
7.2.80.0200.01816.17
7.2.70.0630.01315.99
7.2.60.0330.01716.04
7.2.50.0620.01616.26
7.2.40.0570.01416.01
7.2.30.0330.01516.31
7.2.20.0600.01416.20
7.2.10.0440.01916.25
7.2.00.0350.01216.09
7.1.330.0130.01315.92
7.1.320.0100.01315.71
7.1.310.0040.02115.87
7.1.300.0030.02115.73
7.1.290.0000.02715.67
7.1.280.0000.01915.40
7.1.270.0030.02315.77
7.1.260.0030.02315.72
7.1.250.0090.02315.74
7.1.210.0960.00613.55
7.1.200.0930.01013.63
7.1.190.0780.01713.33
7.1.180.0850.01313.50
7.1.170.1870.01713.59
7.1.160.1560.01713.83
7.1.150.0830.00613.68
7.1.140.0950.01614.02
7.1.130.1920.02013.79
7.1.120.1350.01013.88
7.1.110.1290.01013.56
7.1.100.0080.02113.94
7.1.90.1330.00913.77
7.1.80.0760.01213.64
7.1.70.1090.00713.44
7.1.60.1200.02131.45
7.1.50.0330.01531.36
7.1.40.0630.02331.74
7.1.30.0360.01731.60
7.1.20.0320.02331.63
7.1.10.0810.01613.51
7.1.00.0790.01013.73
7.0.310.0140.01313.29
7.0.300.1520.01313.10
7.0.290.1180.00713.37
7.0.280.1760.01913.13
7.0.270.1140.01613.36
7.0.260.0850.01513.82
7.0.250.0170.01113.40
7.0.240.0920.01513.54
7.0.230.0090.02213.60
7.0.220.0210.01413.63
7.0.210.1320.00913.54
7.0.200.1780.01313.59
7.0.190.0140.01413.69
7.0.180.0140.01713.52
7.0.170.0240.02013.69
7.0.160.0870.02013.35
7.0.150.1000.01613.82
7.0.140.1830.01713.58
7.0.130.0970.01713.76
7.0.120.1900.01413.54
7.0.110.1250.01313.71
7.0.100.0890.01413.72
7.0.90.0960.01113.68
7.0.80.1510.01013.60
7.0.70.0980.02613.64
7.0.60.1030.01313.64
7.0.50.1040.01613.79
7.0.40.0790.02113.48
7.0.30.0770.01713.77
7.0.20.0710.01413.41
7.0.10.0970.01413.42
7.0.00.0740.01413.60

preferences:
30.61 ms | 401 KiB | 5 Q