3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PHPFI { public $a = 'A PROPERTY'; protected $b = 'B PROPERTY'; private $c = 'C PROPERTY'; } $phpfi = new PHPFI(); var_dump((array) $phpfi); // array(3) { // ["a"]=> // string(10) "A PROPERTY" // ["*b"]=> // string(10) "B PROPERTY" // ["PHPFIc"]=> // string(10) "C PROPERTY" // } $reflect = new ReflectionClass($phpfi); $reflectProps = $reflect->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_PRIVATE); $props = []; foreach ($reflectProps as $prop) { switch (true) { case $prop->isProtected(): $prefix = '*'; break; case $prop->isPrivate(): $prefix = $prop->getDeclaringClass()->getName(); break; default: $prefix = ''; break; } $prop->setAccessible(true); $props[$prefix . $prop->getName()] = $prop->getValue($phpfi); } var_dump($props); // array(3) { // ["a"]=> // string(10) "A PROPERTY" // ["*b"]=> // string(10) "B PROPERTY" // ["PHPFIc"]=> // string(10) "C PROPERTY" // }

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.4.10.0090.00017.66
8.3.140.0050.00317.33
8.3.130.0160.00318.29
8.3.120.0070.01318.95
8.3.110.0080.00320.94
8.3.100.0000.00824.06
8.3.90.0150.00326.77
8.3.80.0110.00016.50
8.3.70.0110.00718.16
8.3.60.0110.01118.30
8.3.50.0080.01018.15
8.3.40.0030.01818.83
8.3.30.0110.01118.89
8.3.20.0140.00421.73
8.3.10.0040.00721.02
8.3.00.0000.01821.95
8.2.260.0080.00018.99
8.2.250.0150.00416.75
8.2.240.0060.00317.22
8.2.230.0040.00422.58
8.2.220.0120.00937.54
8.2.210.0140.00026.77
8.2.200.0040.00716.50
8.2.190.0140.00416.63
8.2.180.0070.01425.92
8.2.170.0040.01422.96
8.2.160.0060.01522.01
8.2.150.0170.00324.18
8.2.140.0040.00424.66
8.2.130.0130.00626.16
8.2.120.0040.00419.77
8.2.110.0080.00019.52
8.2.100.0000.01117.91
8.2.90.0040.00417.84
8.2.80.0050.00317.97
8.2.70.0090.00018.05
8.2.60.0030.00518.16
8.2.50.0060.00318.10
8.2.40.0050.00319.31
8.2.30.0040.00420.41
8.2.20.0000.00818.11
8.2.10.0030.00618.88
8.2.00.0000.00718.07
8.1.300.0160.00317.73
8.1.290.0060.00318.88
8.1.280.0040.01125.92
8.1.270.0060.01020.77
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00522.13
8.1.230.0000.01222.81
8.1.220.0030.00617.76
8.1.210.0080.00018.77
8.1.200.0060.00317.48
8.1.190.0080.00017.23
8.1.180.0030.00518.10
8.1.170.0000.00818.74
8.1.160.0000.00818.78
8.1.150.0050.00218.89
8.1.140.0040.00420.20
8.1.130.0070.00019.11
8.1.120.0070.00317.45
8.1.110.0030.00617.46
8.1.100.0060.00317.29
8.1.90.0040.00417.40
8.1.80.0000.00817.33
8.1.70.0040.00417.45
8.1.60.0030.00517.63
8.1.50.0100.00017.54
8.1.40.0040.00417.48
8.1.30.0080.00017.61
8.1.20.0060.00317.63
8.1.10.0040.00417.56
8.1.00.0040.00417.50
8.0.300.0080.00019.90
8.0.290.0030.00916.75
8.0.280.0030.00318.45
8.0.270.0070.00016.81
8.0.260.0000.00716.79
8.0.250.0000.00716.85
8.0.240.0000.00717.01
8.0.230.0050.00316.88
8.0.220.0000.00616.95
8.0.210.0070.00016.79
8.0.200.0070.00016.83
8.0.190.0050.00316.80
8.0.180.0000.00816.93
8.0.170.0080.00016.89
8.0.160.0050.00316.84
8.0.150.0040.00416.83
8.0.140.0000.00816.75
8.0.130.0000.00613.27
8.0.120.0000.00716.89
8.0.110.0020.00516.79
8.0.100.0000.00816.75
8.0.90.0050.00216.77
8.0.80.0090.00816.93
8.0.70.0080.00017.00
8.0.60.0040.00416.83
8.0.50.0050.00316.77
8.0.30.0100.01217.07
8.0.20.0110.00916.98
8.0.10.0060.00317.07
8.0.00.0120.01016.69
7.4.330.0030.00316.70
7.4.320.0040.00416.48
7.4.300.0050.00216.44
7.4.290.0000.00816.61
7.4.280.0000.00816.47
7.4.270.0060.00316.63
7.4.260.0030.00516.40
7.4.250.0000.00716.51
7.4.240.0030.00716.56
7.4.230.0000.00816.41
7.4.220.0080.00016.52
7.4.210.0100.00516.59
7.4.200.0070.00016.69
7.4.160.0070.01016.49
7.4.140.0130.00417.86
7.4.130.0070.01116.35
7.4.120.0130.00916.40
7.4.110.0100.00716.56
7.4.100.0120.00616.63
7.4.90.0060.01516.48
7.4.80.0090.00919.39
7.4.70.0070.01416.61
7.4.60.0080.00816.33
7.4.50.0040.00716.49
7.4.40.0190.00616.48
7.4.00.0060.01015.14
7.3.330.0050.00013.39
7.3.320.0030.00313.37
7.3.310.0070.00016.30
7.3.300.0030.00316.27
7.3.290.0120.00316.37
7.3.280.0090.00616.34
7.3.260.0090.00916.43
7.3.240.0060.01116.45
7.3.230.0060.01116.56
7.3.210.0080.00816.61
7.3.200.0170.00016.48
7.3.190.0060.01216.65
7.3.180.0090.00616.60
7.3.170.0140.00316.52
7.3.160.0140.00716.72
7.3.120.0080.00614.79
7.3.110.0050.00914.74
7.3.100.0110.00414.77
7.3.90.0070.00914.91
7.3.80.0040.00914.73
7.3.70.0050.00814.66
7.3.60.0050.00514.79
7.3.50.0070.00814.80
7.3.40.0020.01114.75
7.3.30.0030.00714.69
7.3.20.0100.00316.17
7.3.10.0070.01015.99
7.3.00.0110.00515.86
7.2.330.0090.01616.57
7.2.320.0080.01116.83
7.2.310.0190.00816.48
7.2.300.0080.00816.80
7.2.290.0080.01416.80
7.2.240.0050.00814.94
7.2.230.0030.01015.13
7.2.220.0000.01314.99
7.2.210.0080.00815.21
7.2.200.0050.01115.11
7.2.190.0020.01114.97
7.2.180.0040.01215.08
7.2.170.0080.00815.03
7.2.160.0050.00814.97
7.2.150.0130.00416.28
7.2.140.0090.01016.34
7.2.130.0080.00916.28
7.2.120.0100.01116.23
7.2.110.0110.00216.29
7.2.100.0120.00616.22
7.2.90.0060.01016.29
7.2.80.0050.01016.41
7.2.70.0060.01216.34
7.2.60.0310.01016.38
7.2.50.0080.00816.43
7.2.40.0090.00916.29
7.2.30.0050.00816.26
7.2.20.0080.00916.35
7.2.10.0080.00616.31
7.2.00.0110.00816.15
7.1.330.0110.00215.87
7.1.320.0040.01115.85
7.1.310.0030.01215.71
7.1.300.0060.00515.69
7.1.290.0040.00915.96
7.1.280.0100.00415.10
7.1.270.0050.00815.08
7.1.260.0050.00915.16
7.1.250.0120.00715.18

preferences:
35 ms | 403 KiB | 5 Q