3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP class COMMENT { public function prepare($data) { $data['body'] = COMMENT::prepareBody($data['body']); } public function prepareBody($body) { call_user_func(array('self', 'prepareBody_cb')); } public static function prepareBody_cb($match) { return 'ok'; } } class COMMENTS { function addComment($data) { $x = COMMENT::prepareBody($data); } } class ACTION { function ietsMetComment() { $post = array ('body' => 'a'); $c = new COMMENTS(); $c->addComment($post); } } function selector() { $x = new ACTION; $x->ietsMetComment(); } error_reporting(E_ALL); ini_set('display_errors', 'on'); selector();

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.0100.00716.50
8.3.50.0080.00817.40
8.3.40.0090.00618.83
8.3.30.0000.01418.65
8.3.20.0030.00518.95
8.3.10.0000.00820.52
8.3.00.0040.00417.38
8.2.180.0070.00717.00
8.2.170.0070.00722.96
8.2.160.0070.00722.25
8.2.150.0110.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00019.77
8.2.110.0060.00320.89
8.2.100.0050.01117.84
8.2.90.0050.00318.99
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0000.00817.90
8.2.50.0040.00418.10
8.2.40.0040.00420.59
8.2.30.0070.00318.07
8.2.20.0040.00417.59
8.2.10.0050.00317.88
8.2.00.0060.00317.76
8.1.270.0000.00724.66
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0000.00920.97
8.1.230.0110.00017.70
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00517.36
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0000.00818.59
8.1.160.0000.00722.17
8.1.150.0040.00418.60
8.1.140.0000.00717.41
8.1.130.0030.00317.72
8.1.120.0000.00817.33
8.1.110.0040.00417.29
8.1.100.0040.00417.39
8.1.90.0000.00717.43
8.1.80.0000.00817.45
8.1.70.0000.00817.32
8.1.60.0060.00317.65
8.1.50.0030.00517.50
8.1.40.0040.00417.55
8.1.30.0000.00717.57
8.1.20.0030.00517.59
8.1.10.0040.00417.52
8.1.00.0000.00817.39
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0000.00718.32
8.0.270.0040.00417.23
8.0.260.0070.00016.79
8.0.250.0050.00316.96
8.0.240.0040.00416.89
8.0.230.0000.00716.86
8.0.220.0000.00716.95
8.0.210.0030.00316.82
8.0.200.0060.00016.90
8.0.190.0050.00316.88
8.0.180.0000.00716.94
8.0.170.0000.00916.82
8.0.160.0070.00016.91
8.0.150.0030.00716.91
8.0.140.0050.00516.84
8.0.130.0000.00513.31
8.0.120.0050.00316.94
8.0.110.0050.00316.77
8.0.100.0020.00516.95
8.0.90.0030.00516.87
8.0.80.0090.00616.83
8.0.70.0040.00416.91
8.0.60.0070.00016.74
8.0.50.0000.00716.75
8.0.30.0090.00917.13
8.0.20.0120.00917.02
8.0.10.0000.00817.02
8.0.00.0080.01316.72
7.4.330.0020.00212.91
7.4.320.0030.00316.47
7.4.300.0000.00616.62
7.4.290.0000.00816.42
7.4.280.0000.01016.62
7.4.270.0030.00316.55
7.4.260.0000.00513.41
7.4.250.0080.00016.37
7.4.240.0000.00816.56
7.4.230.0070.00016.74
7.4.220.0030.01916.47
7.4.210.0080.00616.59
7.4.200.0070.00016.52
7.4.190.0070.00016.53
7.4.160.0090.00616.46
7.4.150.0120.00616.33
7.4.140.0170.00716.55
7.4.130.0070.01116.54
7.4.120.0070.01016.54
7.4.110.0090.00916.49
7.4.100.0070.01316.54
7.4.90.0120.00616.49
7.4.80.0070.01016.58
7.4.70.0070.01016.41
7.4.60.0130.00316.51
7.4.50.0060.00316.49
7.4.40.0090.00616.43
7.4.30.0140.00316.52
7.4.00.0030.00614.86
7.3.330.0030.00313.15
7.3.320.0050.00013.38
7.3.310.0000.00716.39
7.3.300.0000.00716.37
7.3.290.0120.00316.39
7.3.280.0120.00516.35
7.3.270.0150.00616.48
7.3.260.0100.00716.48
7.3.250.0130.01316.46
7.3.240.0030.01816.44
7.3.230.0100.01016.59
7.3.210.0100.00716.38
7.3.200.0090.00819.39
7.3.190.0050.01516.41
7.3.180.0140.00716.37
7.3.170.0100.00716.55
7.3.160.0080.00816.32
7.3.120.0140.00414.67
7.2.330.0150.00416.45
7.2.320.0080.00816.65
7.2.310.0090.00616.54
7.2.300.0120.00616.49
7.2.290.0100.00716.40
7.2.60.0030.00616.60
7.2.00.0060.00619.18
7.1.200.0070.00715.84
7.1.100.0030.00918.09
7.1.70.0000.00717.11
7.1.60.0100.01419.40
7.1.50.0100.01016.98
7.1.00.0070.07322.36
7.0.200.0060.00616.54
7.0.140.0130.06722.05
7.0.120.0030.07322.08
7.0.60.0200.07721.81
7.0.50.0070.08317.87
7.0.40.0030.04320.02
7.0.30.0200.04320.19
7.0.20.0370.07320.24
7.0.10.0030.09020.26
7.0.00.0030.07720.22
5.6.280.0070.06720.97
5.6.210.0170.03720.70
5.6.200.0100.05718.16
5.6.190.0130.04320.58
5.6.180.0300.05320.58
5.6.170.0370.06720.47
5.6.160.0070.05020.61
5.6.150.0170.06018.27
5.6.140.0100.04318.16
5.6.130.0030.07318.27
5.6.120.0130.08021.14
5.6.110.0030.07021.03
5.6.100.0100.06721.10
5.6.90.0000.05321.00
5.6.80.0130.07720.32
5.5.350.0130.08020.46
5.5.340.0030.05317.94
5.5.330.0070.08020.42
5.5.320.0630.06720.31
5.5.310.0200.06020.30
5.5.300.0030.08718.04
5.5.290.0070.04717.98
5.5.280.0070.07720.81
5.5.270.0030.07320.64
5.5.260.0070.07720.77
5.5.250.0000.05720.59
5.5.240.0200.04720.20
5.4.450.0230.05319.44
5.4.440.0300.06019.53
5.4.430.0170.04319.50
5.4.420.0200.07719.55
5.4.410.0270.05019.26
5.4.400.0200.05019.14
5.4.390.0200.08019.13
5.4.380.0170.05018.95
5.4.370.0270.03719.11
5.4.360.0230.03719.06
5.4.350.0300.05718.99
5.4.340.0370.06719.22
5.4.320.0230.07019.27
5.4.310.0200.07719.11
5.4.300.0330.05719.10
5.4.290.0230.06319.20
5.4.280.0170.04019.22
5.4.270.0270.05318.93
5.4.260.0170.04719.13
5.4.250.0330.05719.19
5.4.240.0300.04019.06
5.4.230.0270.04318.93
5.4.220.0200.03719.22
5.4.210.0270.06018.93
5.4.200.0200.07019.10
5.4.190.0270.05319.21
5.4.180.0170.06719.02
5.4.170.0200.05719.16
5.4.160.0200.05719.05
5.4.150.0330.06719.24
5.4.140.0230.06716.40
5.4.130.0200.03716.39
5.4.120.0130.04716.43
5.4.110.0270.04016.37
5.4.100.0230.03716.30
5.4.90.0230.03316.50
5.4.80.0230.04716.55
5.4.70.0230.03716.55
5.4.60.0330.05716.54
5.4.50.0230.04016.48
5.4.40.0270.06016.21
5.4.30.0270.03716.45
5.4.20.0370.03016.37
5.4.10.0170.03716.45
5.4.00.0170.04715.90
5.3.290.0230.03714.69
5.3.280.0270.05714.59
5.3.270.0270.06314.68
5.3.260.0300.06014.50
5.3.250.0300.07014.61
5.3.240.0200.04314.76
5.3.230.0230.05314.76
5.3.220.0270.04314.74
5.3.210.0200.03714.49
5.3.200.0170.06714.59
5.3.190.0200.07314.47
5.3.180.0430.05314.63
5.3.170.0270.05714.63
5.3.160.0170.06014.60
5.3.150.0230.03714.58
5.3.140.0300.06714.45
5.3.130.0230.04314.60
5.3.120.0130.03714.56
5.3.110.0170.03714.63
5.3.100.0100.05714.11
5.3.90.0230.05014.05
5.3.80.0270.06714.07
5.3.70.0300.06013.92
5.3.60.0130.04714.01
5.3.50.0330.05013.93
5.3.40.0200.04014.01
5.3.30.0230.04313.94
5.3.20.0230.06013.78
5.3.10.0230.06713.74
5.3.00.0300.05013.71
5.2.170.0200.04011.08
5.2.160.0170.04311.23
5.2.150.0130.03711.20
5.2.140.0200.02711.08
5.2.130.0130.04011.11
5.2.120.0230.03011.11
5.2.110.0200.05711.11
5.2.100.0100.04311.14
5.2.90.0370.02311.11
5.2.80.0230.03711.16
5.2.70.0130.04011.00
5.2.60.0130.05311.13
5.2.50.0130.04711.03
5.2.40.0200.05310.99
5.2.30.0200.05010.93
5.2.20.0100.04710.98
5.2.10.0130.06310.80
5.2.00.0100.03710.74
5.1.60.0200.0239.98
5.1.50.0130.03710.06
5.1.40.0100.0279.97
5.1.30.0130.05010.50
5.1.20.0130.03310.45
5.1.10.0170.05310.10
5.1.00.0070.03010.00
5.0.50.0130.0209.11
5.0.40.0100.0179.11
5.0.30.0100.0339.11
5.0.20.0070.0439.11
5.0.10.0030.0379.11
5.0.00.0100.0539.11
4.4.90.0100.0309.11
4.4.80.0030.0239.11
4.4.70.0030.0379.11
4.4.60.0070.0379.11
4.4.50.0170.0279.11
4.4.40.0030.0279.11
4.4.30.0070.0279.11
4.4.20.0100.0209.11
4.4.10.0030.0179.11
4.4.00.0100.0239.11
4.3.110.0070.0179.11
4.3.100.0030.0209.11
4.3.90.0100.0339.11
4.3.80.0070.0309.11
4.3.70.0070.0309.11
4.3.60.0100.0279.11
4.3.50.0070.0379.11
4.3.40.0130.0379.11
4.3.30.0030.0279.11
4.3.20.0030.0279.11
4.3.10.0030.0279.11
4.3.00.0030.0279.11

preferences:
53.93 ms | 400 KiB | 5 Q