3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new stdClass; $class->properties = [new stdClass,new stdClass, new stdClass]; $class->properties[0]->name = "Anne"; $class->properties[1]->name = "Bob"; $class->properties[2]->name = "Robin"; $fieldsA = []; $fieldsB = []; if ( array_walk( $class->properties, function( $o ) use ( &$fieldsA ){ $fieldsA[] = $o->name; }) ) { echo "\nMission accomplished:\n"; var_dump($fieldsA); } $fieldsB = array_map( function( $e ) { return $e->name; },$class->properties); if (count($fieldsB) > 0) { echo "\nMission accomplished:\n"; var_dump( $fieldsB ); }

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.70.0090.00616.75
8.3.60.0140.00018.31
8.3.50.0080.01216.49
8.3.40.0060.01218.71
8.3.30.0140.00018.73
8.3.20.0040.00420.04
8.3.10.0040.00421.97
8.3.00.0040.00419.69
8.2.190.0040.01116.63
8.2.180.0100.00716.38
8.2.170.0120.00622.96
8.2.160.0070.01021.21
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0170.00026.16
8.2.120.0050.00319.77
8.2.110.0070.00322.07
8.2.100.0120.00017.75
8.2.90.0000.00819.21
8.2.80.0030.00517.97
8.2.70.0050.00517.50
8.2.60.0000.00818.03
8.2.50.0060.00318.07
8.2.40.0030.00618.29
8.2.30.0060.00318.22
8.2.20.0080.00018.06
8.2.10.0040.00418.08
8.2.00.0000.00718.13
8.1.280.0090.00625.92
8.1.270.0090.00022.19
8.1.260.0000.00926.35
8.1.250.0080.00028.09
8.1.240.0070.01024.02
8.1.230.0040.00819.26
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0000.00719.00
8.1.150.0040.00418.89
8.1.140.0000.00719.59
8.1.130.0040.00718.91
8.1.120.0080.00017.41
8.1.110.0040.00417.48
8.1.100.0000.00717.30
8.1.90.0000.00717.37
8.1.80.0000.00817.53
8.1.70.0050.00317.52
8.1.60.0050.00317.63
8.1.50.0000.01017.50
8.1.40.0020.00517.36
8.1.30.0050.00317.50
8.1.20.0000.00817.69
8.1.10.0070.00017.57
8.1.00.0030.00617.55
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0070.00018.45
8.0.270.0000.00717.25
8.0.260.0060.00018.85
8.0.250.0000.00816.95
8.0.240.0040.00416.96
8.0.230.0030.00516.82
8.0.220.0000.00716.81
8.0.210.0070.00016.93
8.0.200.0000.00716.87
8.0.190.0000.00716.86
8.0.180.0030.00516.81
8.0.170.0030.00516.95
8.0.160.0030.01116.86
8.0.150.0000.00716.95
8.0.140.0000.00716.88
8.0.130.0050.00013.37
8.0.120.0000.00816.90
8.0.110.0040.00416.93
8.0.100.0000.00816.93
8.0.90.0030.00616.79
8.0.80.0150.00316.85
8.0.70.0030.00517.01
8.0.60.0070.00016.97
8.0.50.0040.00416.77
8.0.30.0120.00717.07
8.0.20.0140.01417.40
8.0.10.0000.00716.91
8.0.00.0100.00716.83
7.4.330.0020.00215.55
7.4.320.0060.00016.67
7.4.300.0060.00016.53
7.4.290.0070.00416.38
7.4.280.0110.00316.55
7.4.270.0040.00416.66
7.4.260.0030.00616.48
7.4.250.0030.00316.56
7.4.240.0000.00716.61
7.4.230.0020.00516.64
7.4.220.0070.01116.71
7.4.210.0120.00416.64
7.4.200.0050.00216.59
7.4.160.0090.01016.57
7.4.150.0070.01017.40
7.4.140.0070.01217.86
7.4.130.0090.01516.52
7.4.120.0070.01116.56
7.4.110.0100.00616.40
7.4.100.0090.00916.44
7.4.90.0200.00016.59
7.4.80.0090.00919.39
7.4.70.0030.01316.34
7.4.60.0090.00916.58
7.4.50.0100.00716.70
7.4.40.0030.01516.68
7.4.30.0030.01516.47
7.4.10.0170.00314.96
7.4.00.0070.00914.92
7.3.330.0050.00013.33
7.3.320.0030.00313.23
7.3.310.0040.00416.40
7.3.300.0040.00416.36
7.3.290.0060.00816.36
7.3.280.0070.00816.38
7.3.270.0110.00617.40
7.3.260.0070.01116.53
7.3.250.0120.00716.49
7.3.240.0120.00816.40
7.3.230.0090.00916.59
7.3.210.0030.01516.26
7.3.200.0100.00716.42
7.3.190.0100.01016.36
7.3.180.0130.00316.53
7.3.170.0030.01416.56
7.3.160.0060.01116.41
7.3.130.0090.00914.82
7.3.120.0070.01115.02
7.3.110.0070.00714.75
7.3.100.0060.00614.58
7.3.90.0070.00714.88
7.3.80.0090.00614.79
7.3.70.0040.01214.73
7.3.60.0050.00514.63
7.3.50.0030.01014.72
7.3.40.0000.00914.89
7.3.30.0070.01114.68
7.3.20.0060.00916.80
7.3.10.0090.00616.67
7.3.00.0030.01016.78
7.2.330.0170.00016.63
7.2.320.0100.00716.94
7.2.310.0040.01916.61
7.2.300.0070.01016.78
7.2.290.0110.00716.53
7.2.260.0090.00915.06
7.2.250.0030.01315.34
7.2.240.0070.01014.77
7.2.230.0100.00715.28
7.2.220.0040.00814.93
7.2.210.0080.00815.20
7.2.200.0100.01015.23
7.2.190.0030.01014.95
7.2.180.0130.00015.25
7.2.170.0080.00415.17
7.2.160.0040.01415.19
7.2.150.0070.01017.16
7.2.140.0070.01117.14
7.2.130.0060.00916.99
7.2.120.0080.00416.64
7.2.110.0070.00716.85
7.2.100.0030.01417.14
7.2.90.0080.00816.86
7.2.80.0090.00616.78
7.2.70.0030.01316.98
7.2.60.0030.01016.86
7.2.50.0140.00017.03
7.2.40.0070.01016.95
7.2.30.0070.00717.01
7.2.20.0070.01117.18
7.2.10.0060.00616.93
7.2.00.0040.01116.95
7.1.330.0040.01115.56
7.1.320.0080.00315.92
7.1.310.0000.01615.69
7.1.300.0030.01015.69
7.1.290.0060.00915.60
7.1.280.0070.00715.93
7.1.270.0000.01015.74
7.1.260.0070.00715.52
7.1.250.0060.00615.98
7.1.240.0100.00315.93
7.1.230.0130.00616.04
7.1.220.0160.00315.86
7.1.210.0050.00815.66
7.1.200.0090.00015.68
7.1.190.0060.01215.77
7.1.180.0080.00315.64
7.1.170.0090.00015.68
7.1.160.0000.01115.90
7.1.150.0030.00715.78
7.1.140.0040.01115.86
7.1.130.0100.00015.72
7.1.120.0080.00415.90
7.1.110.0040.00815.92
7.1.100.0060.00315.86
7.1.90.0060.00615.93
7.1.80.1190.01515.92
7.1.70.1110.01215.56
7.1.60.1210.00724.50
7.1.50.1120.01324.47
7.1.40.1130.01324.18
7.1.30.1310.00824.03
7.1.20.1420.00624.24
7.1.10.1140.00815.07
7.1.00.1320.00915.34
7.0.330.0040.00415.38
7.0.320.0100.00315.39
7.0.310.0100.00315.11
7.0.300.0060.00615.48
7.0.290.0000.01415.41
7.0.280.0110.00315.57
7.0.270.0030.00915.45
7.0.260.0040.00815.61
7.0.250.0090.00615.31
7.0.240.0060.01015.42
7.0.230.0100.00315.48
7.0.220.0030.01015.41
7.0.210.0030.00615.37
7.0.200.1210.00715.07
7.0.190.1200.00915.14
7.0.180.1080.00714.97
7.0.170.1330.00514.95
7.0.160.1310.00715.04
7.0.150.1070.01314.89
7.0.140.1380.00514.87
7.0.130.1050.01114.94
7.0.120.1070.00515.15
7.0.110.1230.00815.06
7.0.100.1200.00815.03
7.0.90.1620.00614.87
7.0.80.1210.01215.01
7.0.70.1260.00914.99
7.0.60.1260.00614.74
7.0.50.1350.00715.09
7.0.40.1350.01214.07
7.0.30.1360.00814.12
7.0.20.1210.00513.97
7.0.10.1340.00613.98
7.0.00.1490.01114.01
5.6.400.0040.01114.75
5.6.390.0030.00614.21
5.6.380.0100.00314.75
5.6.370.0070.00714.45
5.6.360.0060.01014.49
5.6.350.0060.00614.46
5.6.340.0030.01414.46
5.6.330.0030.01014.63
5.6.320.0000.01314.47
5.6.310.0040.01214.48
5.6.300.0030.00714.49
5.6.290.0080.00414.14
5.6.280.0030.00714.66
5.6.270.0120.00014.30
5.6.260.0000.01214.34
5.6.250.0070.00714.73
5.6.240.0040.00814.49
5.6.230.0060.00614.54
5.6.220.0040.00414.64
5.6.210.0090.00614.53
5.6.200.0030.01014.50
5.6.190.0030.00914.70
5.6.180.0070.00714.64
5.6.170.0060.00314.49
5.6.160.0080.00414.45
5.6.150.0060.00614.61
5.6.140.0030.01014.69
5.6.130.0080.00414.33
5.6.120.0030.01014.33
5.6.110.0060.00714.27
5.6.100.0030.01214.55
5.6.90.0100.00714.21
5.6.80.0100.00714.42
5.6.70.0030.00614.57
5.6.60.0000.01014.40
5.6.50.0000.01014.34
5.6.40.0100.00314.41
5.6.30.0060.00814.45
5.6.20.0030.01014.42
5.6.10.0060.01014.34
5.6.00.0070.00714.42

preferences:
47.84 ms | 401 KiB | 5 Q