3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait EloquentValidatingTrait { // Some declarations skipped /** * Eloquent will call this on model boot */ public static function bootEloquentValidatingTrait() { // Calling Model::saving() and asking it to execute assertIsValid() before model is saved into database $savingCallable = [static::class, 'saving']; $validationCallable = [static::class, 'assertIsValid']; forward_static_call($savingCallable, $validationCallable); } } class MyClass { use EloquentValidatingTrait; static function saving() {} static function assertIsValid() {} } $myClass = new MyClass(); $myClass->bootEloquentValidatingTrait();

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.110.0000.00716.48
8.3.100.0060.00316.38
8.3.90.0080.00019.99
8.3.80.0060.00317.97
8.3.70.0090.00918.43
8.3.60.0110.00416.50
8.3.50.0110.01021.94
8.3.40.0140.00018.80
8.3.30.0110.00418.87
8.3.20.0000.00820.29
8.3.10.0040.00423.69
8.3.00.0080.00020.79
8.2.230.0040.00420.94
8.2.220.0110.00424.06
8.2.210.0040.00426.77
8.2.200.0090.00016.50
8.2.190.0140.00716.88
8.2.180.0070.01018.54
8.2.170.0130.00318.84
8.2.160.0060.00622.96
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0090.00026.16
8.2.120.0060.00319.73
8.2.110.0050.00520.97
8.2.100.0040.00817.91
8.2.90.0090.00019.77
8.2.80.0000.00718.09
8.2.70.0030.00617.50
8.2.60.0000.00917.63
8.2.50.0000.00917.63
8.2.40.0000.00818.04
8.2.30.0050.00318.09
8.2.20.0050.00317.58
8.2.10.0000.00818.13
8.2.00.0000.00718.07
8.1.290.0090.00018.88
8.1.280.0070.00725.92
8.1.270.0130.00323.90
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0050.00323.92
8.1.230.0070.00421.04
8.1.220.0060.00317.74
8.1.210.0030.00720.49
8.1.200.0030.00617.35
8.1.190.0060.00317.23
8.1.180.0050.00318.10
8.1.170.0040.00417.62
8.1.160.0050.00222.01
8.1.150.0030.00518.86
8.1.140.0030.00617.51
8.1.130.0000.00717.82
8.1.120.0000.00817.45
8.1.110.0000.00717.39
8.1.100.0040.00417.54
8.1.90.0040.00417.43
8.1.80.0000.00717.37
8.1.70.0040.00417.39
8.1.60.0000.00817.65
8.1.50.0000.00817.57
8.1.40.0000.00717.53
8.1.30.0090.00017.66
8.1.20.0000.00817.61
8.1.10.0000.00817.61
8.1.00.0040.00417.52
8.0.300.0050.00219.96
8.0.290.0040.00416.63
8.0.280.0070.00018.46
8.0.270.0040.00417.23
8.0.260.0020.00517.27
8.0.250.0080.00016.91
8.0.240.0000.00716.98
8.0.230.0000.00716.95
8.0.220.0000.00716.79
8.0.210.0050.00316.91
8.0.200.0060.00017.00
8.0.190.0000.00716.86
8.0.180.0020.00516.94
8.0.170.0090.00016.99
8.0.160.0050.00316.96
8.0.150.0080.00016.89
8.0.140.0050.00216.82
8.0.130.0000.00613.30
8.0.120.0040.00416.76
8.0.110.0030.00616.91
8.0.100.0000.00716.95
8.0.90.0070.00016.93
8.0.80.0080.00816.90
8.0.70.0070.00016.77
8.0.60.0040.00416.93
8.0.50.0040.00416.79
8.0.30.0110.00916.98
8.0.20.0120.00717.40
8.0.10.0030.00517.07
8.0.00.0090.00916.68
7.4.330.0030.00315.03
7.4.320.0000.00616.47
7.4.300.0030.00316.62
7.4.290.0040.00416.54
7.4.280.0040.00416.54
7.4.270.0030.00316.62
7.4.260.0030.00316.59
7.4.250.0060.00316.48
7.4.240.0040.00416.52
7.4.230.0070.00016.62
7.4.220.0160.00616.61
7.4.210.0030.01016.46
7.4.200.0030.00616.64
7.4.160.0040.01116.61
7.4.150.0090.00917.40
7.4.140.0100.00717.86
7.4.130.0060.01216.41
7.4.120.0050.01416.55
7.4.110.0060.01216.49
7.4.100.0100.01016.47
7.4.90.0140.00316.71
7.4.80.0170.00719.39
7.4.70.0110.01116.56
7.4.60.0060.00916.61
7.4.50.0090.00016.64
7.4.40.0180.00316.57
7.4.30.0070.01016.44
7.4.00.0100.00814.98
7.3.330.0050.00013.26
7.3.320.0040.00813.27
7.3.310.0000.00716.26
7.3.300.0070.00016.30
7.3.290.0080.00616.30
7.3.280.0070.00816.30
7.3.270.0090.01217.40
7.3.260.0130.00816.19
7.3.250.0080.01216.41
7.3.240.0120.00416.48
7.3.230.0150.00916.59
7.3.210.0090.00916.35
7.3.200.0070.01019.39
7.3.190.0060.01016.21
7.3.180.0130.00316.48
7.3.170.0090.00916.37
7.3.160.0110.00716.29
7.3.120.0060.01014.86
7.3.110.0040.01114.60
7.3.100.0030.01414.70
7.3.90.0030.01214.97
7.3.80.0040.01114.84
7.3.70.0070.00414.92
7.3.60.0070.00714.71
7.3.50.0090.00614.62
7.3.40.0070.00714.81
7.3.30.0070.01114.64
7.3.20.0070.01016.64
7.3.10.0050.00816.71
7.3.00.0050.00716.62
7.2.330.0090.00816.42
7.2.320.0130.00716.74
7.2.310.0100.00716.49
7.2.300.0130.00616.77
7.2.290.0070.01016.52
7.2.250.0070.01115.06
7.2.240.0070.01014.74
7.2.230.0060.01215.08
7.2.220.0030.01215.03
7.2.210.0030.01314.71
7.2.200.0000.01315.21
7.2.190.0100.00614.88
7.2.180.0090.00615.07
7.2.170.0060.01014.93
7.2.130.0070.01016.79
7.2.120.0070.01016.71
7.2.110.0060.00817.10
7.2.100.0070.00316.79
7.2.90.0120.00016.80
7.2.80.0060.00316.85
7.2.70.0030.00617.06
7.2.60.0050.00816.81
7.2.50.0130.00616.75
7.2.40.0030.01016.68
7.2.30.0000.01517.04
7.2.20.0030.00616.86
7.2.10.0000.01216.90
7.2.00.0030.01216.55
7.1.330.0110.00315.75
7.1.320.0090.00915.68
7.1.310.0070.00715.68
7.1.300.0030.01115.75
7.1.290.0060.00915.77
7.1.280.0030.01015.45
7.1.270.0080.00415.70
7.1.260.0130.00315.84
7.1.250.0030.00915.75
7.1.200.0070.00315.90
7.1.70.0000.00716.94
7.1.60.0110.01519.50
7.1.50.0070.01516.93
7.1.00.0000.08022.36
7.0.200.0040.00416.81
7.0.100.0070.07720.18
7.0.90.0030.08319.90
7.0.80.0100.08319.94
7.0.70.0130.07319.93
7.0.60.0230.06720.06
7.0.50.0100.08320.21
7.0.40.0130.04020.15
7.0.30.0100.05320.05
7.0.20.0070.06720.08
7.0.10.0070.08320.13
7.0.00.0030.08720.05
5.6.280.0030.07321.10
5.6.250.0000.08720.73
5.6.240.0070.05020.54
5.6.230.0100.06720.64
5.6.220.0130.07320.68
5.6.210.0070.08020.78
5.6.200.0070.05021.11
5.6.190.0130.07321.12
5.6.180.0100.07721.09
5.6.170.0100.08320.97
5.6.160.0000.06721.03
5.6.150.0170.07721.06
5.6.140.0100.05321.03
5.6.130.0130.08321.06
5.6.120.0070.08321.00
5.6.110.0100.05021.04
5.6.100.0100.07020.93
5.6.90.0100.08320.94
5.6.80.0100.08020.39
5.6.70.0070.08320.32
5.6.60.0100.08320.48
5.6.50.0100.07720.43
5.6.40.0070.04720.32
5.6.30.0170.06720.42
5.6.20.0130.06720.30
5.6.10.0100.07320.30
5.6.00.0100.07720.47
5.5.380.0170.07020.43
5.5.370.0030.06320.51
5.5.360.0100.08020.35
5.5.350.0030.07720.46
5.5.340.0070.08320.84
5.5.330.0070.08320.86
5.5.320.0070.07720.84
5.5.310.0000.08020.74
5.5.300.0070.07720.93
5.5.290.0070.07720.77
5.5.280.0100.07720.90
5.5.270.0100.08020.80
5.5.260.0000.09020.89
5.5.250.0070.05020.71
5.5.240.0130.07720.19
5.5.230.0070.08320.12
5.5.220.0030.08020.19
5.5.210.0030.07320.16
5.5.200.0070.08020.00
5.5.190.0130.07020.23
5.5.180.0030.04720.24
5.5.160.0100.07320.14
5.5.150.0100.07320.29
5.5.140.0130.07020.22
5.5.130.0000.05720.19
5.5.120.0130.05720.28
5.5.110.0100.07320.13
5.5.100.0070.05320.16
5.5.90.0130.08020.07
5.5.80.0030.08320.08
5.5.70.0130.06020.09
5.5.60.0030.06720.07
5.5.50.0100.07320.09
5.5.40.0200.06320.05
5.5.30.0100.07020.08
5.5.20.0030.08320.03
5.5.10.0030.08020.06
5.5.00.0000.05720.05
5.4.450.0030.08719.46
5.4.440.0100.08019.27
5.4.430.0170.07019.42
5.4.420.0030.08719.50
5.4.410.0070.08319.24
5.4.400.0170.06718.95
5.4.390.0100.06718.95
5.4.380.0100.07719.13
5.4.370.0030.08019.24
5.4.360.0130.07019.12
5.4.350.0130.07018.90
5.4.340.0070.07719.15
5.4.320.0070.07019.04
5.4.310.0030.04018.88
5.4.300.0070.05019.04
5.4.290.0030.07719.20
5.4.280.0030.08319.03
5.4.270.0030.05019.09
5.4.260.0030.07719.10
5.4.250.0030.08019.13
5.4.240.0100.05019.23
5.4.230.0100.07718.86
5.4.220.0070.08019.04
5.4.210.0070.07018.84
5.4.200.0130.06719.12
5.4.190.0030.07718.87
5.4.180.0070.07019.02
5.4.170.0100.07319.25
5.4.160.0200.06019.02
5.4.150.0100.07319.12
5.4.140.0070.06316.39
5.4.130.0100.06716.39
5.4.120.0030.07316.39
5.4.110.0000.05016.42
5.4.100.0070.07316.53
5.4.90.0000.07316.49
5.4.80.0100.06316.51
5.4.70.0070.07016.31
5.4.60.0100.04016.38
5.4.50.0030.07316.24
5.4.40.0100.07016.45
5.4.30.0100.03716.48
5.4.20.0030.07716.30
5.4.10.0130.06316.48
5.4.00.0100.06715.79
5.3.290.0070.04314.63
5.3.280.0030.08014.58
5.3.270.0130.07014.57
5.3.260.0100.05014.45
5.3.250.0100.03714.46
5.3.240.0100.07314.55
5.3.230.0170.07714.52
5.3.220.0000.08014.44
5.3.210.0200.06314.53
5.3.200.0030.08014.53
5.3.190.0100.06714.52
5.3.180.0100.07014.52
5.3.170.0130.05314.55
5.3.160.0070.07314.56
5.3.150.0000.05014.48
5.3.140.0070.08014.50
5.3.130.0100.07014.41
5.3.120.0030.07714.46
5.3.110.0000.08014.51
5.3.100.0070.04314.01
5.3.90.0070.07313.99
5.3.80.0000.04714.01
5.3.70.0000.07713.99
5.3.60.0100.07013.86
5.3.50.0100.04013.93
5.3.40.0100.05713.80
5.3.30.0030.07013.91
5.3.20.0030.07713.61
5.3.10.0100.07013.52
5.3.00.0070.06313.57
5.2.170.0000.06711.14
5.2.160.0070.05311.14
5.2.150.0030.06311.13
5.2.140.0000.03711.19
5.2.130.0070.05711.09
5.2.120.0030.05010.94
5.2.110.0070.06311.06
5.2.100.0070.05711.13
5.2.90.0030.06011.05
5.2.80.0030.06011.05
5.2.70.0030.06311.09
5.2.60.0100.05311.12
5.2.50.0000.05710.86
5.2.40.0070.06010.84
5.2.30.0070.06010.89
5.2.20.0000.04310.81
5.2.10.0030.04310.71
5.2.00.0000.04310.57
5.1.60.0000.02710.08
5.1.50.0000.02710.08
5.1.40.0000.02710.08
5.1.30.0000.03010.36
5.1.20.0030.02310.40
5.1.10.0000.03310.08
5.1.00.0000.02710.10
5.0.50.0000.02010.08
5.0.40.0070.01310.08
5.0.30.0000.03010.08
5.0.20.0000.02310.08
5.0.10.0030.01710.08
5.0.00.0030.03010.08
4.4.90.0070.02710.08
4.4.80.0000.03710.08
4.4.70.0000.01710.08
4.4.60.0030.01310.08
4.4.50.0000.01710.08
4.4.40.0000.02310.08
4.4.30.0000.01710.08
4.4.20.0030.01310.08
4.4.10.0030.01310.08
4.4.00.0000.02310.08
4.3.110.0030.01310.08
4.3.100.0000.01710.08
4.3.90.0000.02710.08
4.3.80.0000.05010.08
4.3.70.0000.01310.08
4.3.60.0000.01310.08
4.3.50.0000.03310.08
4.3.40.0030.02010.08
4.3.30.0000.02310.08
4.3.20.0000.01710.08
4.3.10.0030.01710.08
4.3.00.0000.02310.08

preferences:
32.26 ms | 403 KiB | 5 Q